Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt +4 −4 Original line number Diff line number Diff line Loading @@ -41,9 +41,9 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi private val ANIMATE_DURATION: Long = 200 private val positioner: BubblePositioner = positioner private val manageView by lazy { findViewById<ViewGroup>(R.id.manage_education_view) } private val manageButton by lazy { findViewById<Button>(R.id.manage_button) } private val gotItButton by lazy { findViewById<Button>(R.id.got_it) } private val manageView by lazy { requireViewById<ViewGroup>(R.id.manage_education_view) } private val manageButton by lazy { requireViewById<Button>(R.id.manage_button) } private val gotItButton by lazy { requireViewById<Button>(R.id.got_it) } private var isHiding = false private var realManageButtonRect = Rect() Loading Loading @@ -122,7 +122,7 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi manageButton .setOnClickListener { hide() expandedView.findViewById<View>(R.id.manage_button).performClick() expandedView.requireViewById<View>(R.id.manage_button).performClick() } gotItButton.setOnClickListener { hide() } setOnClickListener { hide() } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/StackEducationView.kt +3 −3 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ class StackEducationView constructor( private val positioner: BubblePositioner = positioner private val controller: BubbleController = controller private val view by lazy { findViewById<View>(R.id.stack_education_layout) } private val titleTextView by lazy { findViewById<TextView>(R.id.stack_education_title) } private val descTextView by lazy { findViewById<TextView>(R.id.stack_education_description) } private val view by lazy { requireViewById<View>(R.id.stack_education_layout) } private val titleTextView by lazy { requireViewById<TextView>(R.id.stack_education_title) } private val descTextView by lazy { requireViewById<TextView>(R.id.stack_education_description) } var isHiding = false private set Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +20 −19 Original line number Diff line number Diff line Loading @@ -313,7 +313,7 @@ class DesktopTasksController( task.taskId ) val wct = WindowContainerTransaction() wct.setBounds(task.token, null) wct.setBounds(task.token, Rect()) if (Transitions.ENABLE_SHELL_TRANSITIONS) { enterDesktopTaskTransitionHandler.startCancelMoveToDesktopMode(wct, Loading Loading @@ -550,6 +550,7 @@ class DesktopTasksController( ) // Check if we should skip handling this transition var reason = "" val triggerTask = request.triggerTask val shouldHandleRequest = when { // Only handle open or to front transitions Loading @@ -558,19 +559,19 @@ class DesktopTasksController( false } // Only handle when it is a task transition request.triggerTask == null -> { triggerTask == null -> { reason = "triggerTask is null" false } // Only handle standard type tasks request.triggerTask.activityType != ACTIVITY_TYPE_STANDARD -> { reason = "activityType not handled (${request.triggerTask.activityType})" triggerTask.activityType != ACTIVITY_TYPE_STANDARD -> { reason = "activityType not handled (${triggerTask.activityType})" false } // Only handle fullscreen or freeform tasks request.triggerTask.windowingMode != WINDOWING_MODE_FULLSCREEN && request.triggerTask.windowingMode != WINDOWING_MODE_FREEFORM -> { reason = "windowingMode not handled (${request.triggerTask.windowingMode})" triggerTask.windowingMode != WINDOWING_MODE_FULLSCREEN && triggerTask.windowingMode != WINDOWING_MODE_FREEFORM -> { reason = "windowingMode not handled (${triggerTask.windowingMode})" false } // Otherwise process it Loading @@ -586,9 +587,8 @@ class DesktopTasksController( return null } val task: RunningTaskInfo = request.triggerTask val result = when { val result = triggerTask?.let { task -> when { // If display has tasks stashed, handle as stashed launch desktopModeTaskRepository.isStashed(task.displayId) -> handleStashedTaskLaunch(task) // Check if fullscreen task should be updated Loading @@ -599,6 +599,7 @@ class DesktopTasksController( null } } } KtProtoLog.v( WM_SHELL_DESKTOP_MODE, "DesktopTasksController: handleRequest result=%s", Loading Loading @@ -703,7 +704,7 @@ class DesktopTasksController( WINDOWING_MODE_FULLSCREEN } wct.setWindowingMode(taskInfo.token, targetWindowingMode) wct.setBounds(taskInfo.token, null) wct.setBounds(taskInfo.token, Rect()) if (isDesktopDensityOverrideSet()) { wct.setDensityDpi(taskInfo.token, getDefaultDensityDpi()) } Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/ToggleResizeDesktopTaskTransitionHandler.kt +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ class ToggleResizeDesktopTaskTransitionHandler( ): Boolean { val change = findRelevantChange(info) val leash = change.leash val taskId = change.taskInfo.taskId val taskId = checkNotNull(change.taskInfo).taskId val startBounds = change.startAbsBounds val endBounds = change.endAbsBounds val windowDecor = Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeAppControlsWindowDecorationViewHolder.kt +11 −9 Original line number Diff line number Diff line Loading @@ -23,14 +23,14 @@ internal class DesktopModeAppControlsWindowDecorationViewHolder( appIcon: Drawable ) : DesktopModeWindowDecorationViewHolder(rootView) { private val captionView: View = rootView.findViewById(R.id.desktop_mode_caption) private val captionHandle: View = rootView.findViewById(R.id.caption_handle) private val openMenuButton: View = rootView.findViewById(R.id.open_menu_button) private val closeWindowButton: ImageButton = rootView.findViewById(R.id.close_window) private val expandMenuButton: ImageButton = rootView.findViewById(R.id.expand_menu_button) private val maximizeWindowButton: ImageButton = rootView.findViewById(R.id.maximize_window) private val appNameTextView: TextView = rootView.findViewById(R.id.application_name) private val appIconImageView: ImageView = rootView.findViewById(R.id.application_icon) private val captionView: View = rootView.requireViewById(R.id.desktop_mode_caption) private val captionHandle: View = rootView.requireViewById(R.id.caption_handle) private val openMenuButton: View = rootView.requireViewById(R.id.open_menu_button) private val closeWindowButton: ImageButton = rootView.requireViewById(R.id.close_window) private val expandMenuButton: ImageButton = rootView.requireViewById(R.id.expand_menu_button) private val maximizeWindowButton: ImageButton = rootView.requireViewById(R.id.maximize_window) private val appNameTextView: TextView = rootView.requireViewById(R.id.application_name) private val appIconImageView: ImageView = rootView.requireViewById(R.id.application_icon) init { captionView.setOnTouchListener(onCaptionTouchListener) Loading @@ -47,7 +47,9 @@ internal class DesktopModeAppControlsWindowDecorationViewHolder( override fun bindData(taskInfo: RunningTaskInfo) { val captionDrawable = captionView.background as GradientDrawable captionDrawable.setColor(taskInfo.taskDescription.statusBarColor) taskInfo.taskDescription?.statusBarColor?.let { captionDrawable.setColor(it) } closeWindowButton.imageTintList = ColorStateList.valueOf( getCaptionCloseButtonColor(taskInfo)) Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ManageEducationView.kt +4 −4 Original line number Diff line number Diff line Loading @@ -41,9 +41,9 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi private val ANIMATE_DURATION: Long = 200 private val positioner: BubblePositioner = positioner private val manageView by lazy { findViewById<ViewGroup>(R.id.manage_education_view) } private val manageButton by lazy { findViewById<Button>(R.id.manage_button) } private val gotItButton by lazy { findViewById<Button>(R.id.got_it) } private val manageView by lazy { requireViewById<ViewGroup>(R.id.manage_education_view) } private val manageButton by lazy { requireViewById<Button>(R.id.manage_button) } private val gotItButton by lazy { requireViewById<Button>(R.id.got_it) } private var isHiding = false private var realManageButtonRect = Rect() Loading Loading @@ -122,7 +122,7 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi manageButton .setOnClickListener { hide() expandedView.findViewById<View>(R.id.manage_button).performClick() expandedView.requireViewById<View>(R.id.manage_button).performClick() } gotItButton.setOnClickListener { hide() } setOnClickListener { hide() } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/StackEducationView.kt +3 −3 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ class StackEducationView constructor( private val positioner: BubblePositioner = positioner private val controller: BubbleController = controller private val view by lazy { findViewById<View>(R.id.stack_education_layout) } private val titleTextView by lazy { findViewById<TextView>(R.id.stack_education_title) } private val descTextView by lazy { findViewById<TextView>(R.id.stack_education_description) } private val view by lazy { requireViewById<View>(R.id.stack_education_layout) } private val titleTextView by lazy { requireViewById<TextView>(R.id.stack_education_title) } private val descTextView by lazy { requireViewById<TextView>(R.id.stack_education_description) } var isHiding = false private set Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +20 −19 Original line number Diff line number Diff line Loading @@ -313,7 +313,7 @@ class DesktopTasksController( task.taskId ) val wct = WindowContainerTransaction() wct.setBounds(task.token, null) wct.setBounds(task.token, Rect()) if (Transitions.ENABLE_SHELL_TRANSITIONS) { enterDesktopTaskTransitionHandler.startCancelMoveToDesktopMode(wct, Loading Loading @@ -550,6 +550,7 @@ class DesktopTasksController( ) // Check if we should skip handling this transition var reason = "" val triggerTask = request.triggerTask val shouldHandleRequest = when { // Only handle open or to front transitions Loading @@ -558,19 +559,19 @@ class DesktopTasksController( false } // Only handle when it is a task transition request.triggerTask == null -> { triggerTask == null -> { reason = "triggerTask is null" false } // Only handle standard type tasks request.triggerTask.activityType != ACTIVITY_TYPE_STANDARD -> { reason = "activityType not handled (${request.triggerTask.activityType})" triggerTask.activityType != ACTIVITY_TYPE_STANDARD -> { reason = "activityType not handled (${triggerTask.activityType})" false } // Only handle fullscreen or freeform tasks request.triggerTask.windowingMode != WINDOWING_MODE_FULLSCREEN && request.triggerTask.windowingMode != WINDOWING_MODE_FREEFORM -> { reason = "windowingMode not handled (${request.triggerTask.windowingMode})" triggerTask.windowingMode != WINDOWING_MODE_FULLSCREEN && triggerTask.windowingMode != WINDOWING_MODE_FREEFORM -> { reason = "windowingMode not handled (${triggerTask.windowingMode})" false } // Otherwise process it Loading @@ -586,9 +587,8 @@ class DesktopTasksController( return null } val task: RunningTaskInfo = request.triggerTask val result = when { val result = triggerTask?.let { task -> when { // If display has tasks stashed, handle as stashed launch desktopModeTaskRepository.isStashed(task.displayId) -> handleStashedTaskLaunch(task) // Check if fullscreen task should be updated Loading @@ -599,6 +599,7 @@ class DesktopTasksController( null } } } KtProtoLog.v( WM_SHELL_DESKTOP_MODE, "DesktopTasksController: handleRequest result=%s", Loading Loading @@ -703,7 +704,7 @@ class DesktopTasksController( WINDOWING_MODE_FULLSCREEN } wct.setWindowingMode(taskInfo.token, targetWindowingMode) wct.setBounds(taskInfo.token, null) wct.setBounds(taskInfo.token, Rect()) if (isDesktopDensityOverrideSet()) { wct.setDensityDpi(taskInfo.token, getDefaultDensityDpi()) } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/ToggleResizeDesktopTaskTransitionHandler.kt +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ class ToggleResizeDesktopTaskTransitionHandler( ): Boolean { val change = findRelevantChange(info) val leash = change.leash val taskId = change.taskInfo.taskId val taskId = checkNotNull(change.taskInfo).taskId val startBounds = change.startAbsBounds val endBounds = change.endAbsBounds val windowDecor = Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeAppControlsWindowDecorationViewHolder.kt +11 −9 Original line number Diff line number Diff line Loading @@ -23,14 +23,14 @@ internal class DesktopModeAppControlsWindowDecorationViewHolder( appIcon: Drawable ) : DesktopModeWindowDecorationViewHolder(rootView) { private val captionView: View = rootView.findViewById(R.id.desktop_mode_caption) private val captionHandle: View = rootView.findViewById(R.id.caption_handle) private val openMenuButton: View = rootView.findViewById(R.id.open_menu_button) private val closeWindowButton: ImageButton = rootView.findViewById(R.id.close_window) private val expandMenuButton: ImageButton = rootView.findViewById(R.id.expand_menu_button) private val maximizeWindowButton: ImageButton = rootView.findViewById(R.id.maximize_window) private val appNameTextView: TextView = rootView.findViewById(R.id.application_name) private val appIconImageView: ImageView = rootView.findViewById(R.id.application_icon) private val captionView: View = rootView.requireViewById(R.id.desktop_mode_caption) private val captionHandle: View = rootView.requireViewById(R.id.caption_handle) private val openMenuButton: View = rootView.requireViewById(R.id.open_menu_button) private val closeWindowButton: ImageButton = rootView.requireViewById(R.id.close_window) private val expandMenuButton: ImageButton = rootView.requireViewById(R.id.expand_menu_button) private val maximizeWindowButton: ImageButton = rootView.requireViewById(R.id.maximize_window) private val appNameTextView: TextView = rootView.requireViewById(R.id.application_name) private val appIconImageView: ImageView = rootView.requireViewById(R.id.application_icon) init { captionView.setOnTouchListener(onCaptionTouchListener) Loading @@ -47,7 +47,9 @@ internal class DesktopModeAppControlsWindowDecorationViewHolder( override fun bindData(taskInfo: RunningTaskInfo) { val captionDrawable = captionView.background as GradientDrawable captionDrawable.setColor(taskInfo.taskDescription.statusBarColor) taskInfo.taskDescription?.statusBarColor?.let { captionDrawable.setColor(it) } closeWindowButton.imageTintList = ColorStateList.valueOf( getCaptionCloseButtonColor(taskInfo)) Loading