Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +3 −1 Original line number Diff line number Diff line Loading @@ -627,8 +627,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext { /** Adds the given view to WindowManager with the provided LayoutParams (creates new window). */ public void addWindowView(View view, WindowManager.LayoutParams windowLayoutParams) { if (!view.isAttachedToWindow()) { mWindowManager.addView(view, windowLayoutParams); } } /** Removes the given view from WindowManager. See {@link #addWindowView}. */ public void removeWindowView(View view) { Loading quickstep/src/com/android/launcher3/taskbar/VoiceInteractionWindowController.kt +11 −6 Original line number Diff line number Diff line Loading @@ -36,9 +36,12 @@ class VoiceInteractionWindowController(val context: TaskbarActivityContext) override fun draw(canvas: Canvas) { super.draw(canvas) if (this@VoiceInteractionWindowController.context.isGestureNav && controllers.taskbarStashController.isInAppAndNotStashed) { taskbarBackgroundRenderer.draw(canvas) } } } separateWindowForTaskbarBackground.recreateControllers() separateWindowForTaskbarBackground.setWillNotDraw(false) Loading Loading @@ -74,18 +77,20 @@ class VoiceInteractionWindowController(val context: TaskbarActivityContext) fadeStashedHandle.end() } if (context.isGestureNav && controllers.taskbarStashController.isInAppAndNotStashed) { moveTaskbarBackgroundToLowerLayer() } moveTaskbarBackgroundToAppropriateLayer() } /** * Either: * Hides the TaskbarDragLayer background and creates a new window to draw just that background. * OR * Removes the temporary window and show the TaskbarDragLayer background again. */ private fun moveTaskbarBackgroundToLowerLayer() { private fun moveTaskbarBackgroundToAppropriateLayer() { val taskbarBackgroundOverride = controllers.taskbarDragLayerController .overrideBackgroundAlpha if (isVoiceInteractionWindowVisible) { val moveToLowerLayer = isVoiceInteractionWindowVisible if (moveToLowerLayer) { // First add the temporary window, then hide the overlapping taskbar background. context.addWindowView(separateWindowForTaskbarBackground, separateWindowLayoutParams) ViewRootSync.synchronizeNextDraw(separateWindowForTaskbarBackground, context.dragLayer Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +3 −1 Original line number Diff line number Diff line Loading @@ -627,8 +627,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext { /** Adds the given view to WindowManager with the provided LayoutParams (creates new window). */ public void addWindowView(View view, WindowManager.LayoutParams windowLayoutParams) { if (!view.isAttachedToWindow()) { mWindowManager.addView(view, windowLayoutParams); } } /** Removes the given view from WindowManager. See {@link #addWindowView}. */ public void removeWindowView(View view) { Loading
quickstep/src/com/android/launcher3/taskbar/VoiceInteractionWindowController.kt +11 −6 Original line number Diff line number Diff line Loading @@ -36,9 +36,12 @@ class VoiceInteractionWindowController(val context: TaskbarActivityContext) override fun draw(canvas: Canvas) { super.draw(canvas) if (this@VoiceInteractionWindowController.context.isGestureNav && controllers.taskbarStashController.isInAppAndNotStashed) { taskbarBackgroundRenderer.draw(canvas) } } } separateWindowForTaskbarBackground.recreateControllers() separateWindowForTaskbarBackground.setWillNotDraw(false) Loading Loading @@ -74,18 +77,20 @@ class VoiceInteractionWindowController(val context: TaskbarActivityContext) fadeStashedHandle.end() } if (context.isGestureNav && controllers.taskbarStashController.isInAppAndNotStashed) { moveTaskbarBackgroundToLowerLayer() } moveTaskbarBackgroundToAppropriateLayer() } /** * Either: * Hides the TaskbarDragLayer background and creates a new window to draw just that background. * OR * Removes the temporary window and show the TaskbarDragLayer background again. */ private fun moveTaskbarBackgroundToLowerLayer() { private fun moveTaskbarBackgroundToAppropriateLayer() { val taskbarBackgroundOverride = controllers.taskbarDragLayerController .overrideBackgroundAlpha if (isVoiceInteractionWindowVisible) { val moveToLowerLayer = isVoiceInteractionWindowVisible if (moveToLowerLayer) { // First add the temporary window, then hide the overlapping taskbar background. context.addWindowView(separateWindowForTaskbarBackground, separateWindowLayoutParams) ViewRootSync.synchronizeNextDraw(separateWindowForTaskbarBackground, context.dragLayer Loading