Loading core/java/android/window/TaskOrganizerTaskEmbedder.java +3 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,9 @@ public class TaskOrganizerTaskEmbedder extends TaskEmbedder { mTaskToken = taskInfo.token; mTaskLeash = mTaskToken.getLeash(); mTransaction.reparent(mTaskLeash, mSurfaceControl) .show(mSurfaceControl).apply(); .show(mTaskLeash) .show(mSurfaceControl) .apply(); if (mPendingNotifyBoundsChanged) { // TODO: Either defer show or hide and synchronize show with the resize notifyBoundsChanged(); Loading packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java +2 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,7 @@ public class PipAnimationController { getSurfaceTransactionHelper() .crop(tx, leash, getDestinationBounds()) .round(tx, leash, shouldApplyCornerRadius()); tx.show(leash); tx.apply(); } }; Loading Loading @@ -359,6 +360,7 @@ public class PipAnimationController { getSurfaceTransactionHelper() .alpha(tx, leash, 1f) .round(tx, leash, shouldApplyCornerRadius()); tx.show(leash); tx.apply(); } Loading packages/SystemUI/tests/src/com/android/systemui/pip/PipAnimationControllerTest.java +4 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ public class PipAnimationControllerTest extends SysuiTestCase { private PipAnimationController mPipAnimationController; @Mock private SurfaceControl mLeash; @Mock Loading @@ -61,6 +60,10 @@ public class PipAnimationControllerTest extends SysuiTestCase { public void setUp() throws Exception { mPipAnimationController = new PipAnimationController( mContext, new PipSurfaceTransactionHelper(mContext)); mLeash = new SurfaceControl.Builder() .setContainerLayer() .setName("FakeLeash") .build(); MockitoAnnotations.initMocks(this); } Loading services/core/java/com/android/server/wm/ActivityRecord.java +6 −0 Original line number Diff line number Diff line Loading @@ -5212,6 +5212,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A updateReportedVisibilityLocked(); } void onStartingWindowDrawn() { if (task != null) { task.setHasBeenVisible(true); } } /** Called when the windows associated app window container are drawn. */ void onWindowsDrawn(boolean drawn, long timestampNs) { mDrawn = drawn; Loading services/core/java/com/android/server/wm/RootWindowContainer.java +6 −7 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE; import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; import static android.view.WindowManager.TRANSIT_CRASHING_ACTIVITY_CLOSE; import static android.view.WindowManager.TRANSIT_NONE; import static android.view.WindowManager.TRANSIT_SHOW_SINGLE_TASK_DISPLAY; import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT; Loading Loading @@ -2116,16 +2117,19 @@ class RootWindowContainer extends WindowContainer<DisplayContent> try { final Task task = r.getTask(); final ActivityStack pinnedStack = taskDisplayArea.getRootPinnedTask(); // This will change the pinned stack's windowing mode to its original mode, ensuring // we only have one stack that is in pinned mode. if (pinnedStack != null) { pinnedStack.dismissPip(); } final boolean singleActivity = task.getChildCount() == 1; // Set a transition to ensure that we don't immediately try and update the visibility // of the activity entering PIP r.getDisplayContent().prepareAppTransition(TRANSIT_NONE, false); final boolean singleActivity = task.getChildCount() == 1; final ActivityStack stack; if (singleActivity) { stack = r.getRootTask(); Loading @@ -2148,11 +2152,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> mService.continueWindowLayout(); } // TODO: revisit the following statement after the animation is moved from WM to SysUI. // Update the visibility of all activities after the they have been reparented to the new // stack. This MUST run after the animation above is scheduled to ensure that the windows // drawn signal is scheduled after the bounds animation start call on the bounds animator // thread. ensureActivitiesVisible(null, 0, false /* preserveWindows */); resumeFocusedStacksTopActivities(); Loading Loading
core/java/android/window/TaskOrganizerTaskEmbedder.java +3 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,9 @@ public class TaskOrganizerTaskEmbedder extends TaskEmbedder { mTaskToken = taskInfo.token; mTaskLeash = mTaskToken.getLeash(); mTransaction.reparent(mTaskLeash, mSurfaceControl) .show(mSurfaceControl).apply(); .show(mTaskLeash) .show(mSurfaceControl) .apply(); if (mPendingNotifyBoundsChanged) { // TODO: Either defer show or hide and synchronize show with the resize notifyBoundsChanged(); Loading
packages/SystemUI/src/com/android/systemui/pip/PipAnimationController.java +2 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,7 @@ public class PipAnimationController { getSurfaceTransactionHelper() .crop(tx, leash, getDestinationBounds()) .round(tx, leash, shouldApplyCornerRadius()); tx.show(leash); tx.apply(); } }; Loading Loading @@ -359,6 +360,7 @@ public class PipAnimationController { getSurfaceTransactionHelper() .alpha(tx, leash, 1f) .round(tx, leash, shouldApplyCornerRadius()); tx.show(leash); tx.apply(); } Loading
packages/SystemUI/tests/src/com/android/systemui/pip/PipAnimationControllerTest.java +4 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ public class PipAnimationControllerTest extends SysuiTestCase { private PipAnimationController mPipAnimationController; @Mock private SurfaceControl mLeash; @Mock Loading @@ -61,6 +60,10 @@ public class PipAnimationControllerTest extends SysuiTestCase { public void setUp() throws Exception { mPipAnimationController = new PipAnimationController( mContext, new PipSurfaceTransactionHelper(mContext)); mLeash = new SurfaceControl.Builder() .setContainerLayer() .setName("FakeLeash") .build(); MockitoAnnotations.initMocks(this); } Loading
services/core/java/com/android/server/wm/ActivityRecord.java +6 −0 Original line number Diff line number Diff line Loading @@ -5212,6 +5212,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A updateReportedVisibilityLocked(); } void onStartingWindowDrawn() { if (task != null) { task.setHasBeenVisible(true); } } /** Called when the windows associated app window container are drawn. */ void onWindowsDrawn(boolean drawn, long timestampNs) { mDrawn = drawn; Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +6 −7 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE; import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; import static android.view.WindowManager.TRANSIT_CRASHING_ACTIVITY_CLOSE; import static android.view.WindowManager.TRANSIT_NONE; import static android.view.WindowManager.TRANSIT_SHOW_SINGLE_TASK_DISPLAY; import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT; Loading Loading @@ -2116,16 +2117,19 @@ class RootWindowContainer extends WindowContainer<DisplayContent> try { final Task task = r.getTask(); final ActivityStack pinnedStack = taskDisplayArea.getRootPinnedTask(); // This will change the pinned stack's windowing mode to its original mode, ensuring // we only have one stack that is in pinned mode. if (pinnedStack != null) { pinnedStack.dismissPip(); } final boolean singleActivity = task.getChildCount() == 1; // Set a transition to ensure that we don't immediately try and update the visibility // of the activity entering PIP r.getDisplayContent().prepareAppTransition(TRANSIT_NONE, false); final boolean singleActivity = task.getChildCount() == 1; final ActivityStack stack; if (singleActivity) { stack = r.getRootTask(); Loading @@ -2148,11 +2152,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> mService.continueWindowLayout(); } // TODO: revisit the following statement after the animation is moved from WM to SysUI. // Update the visibility of all activities after the they have been reparented to the new // stack. This MUST run after the animation above is scheduled to ensure that the windows // drawn signal is scheduled after the bounds animation start call on the bounds animator // thread. ensureActivitiesVisible(null, 0, false /* preserveWindows */); resumeFocusedStacksTopActivities(); Loading