Loading services/core/java/com/android/server/wm/ActivityRecord.java +4 −2 Original line number Diff line number Diff line Loading @@ -582,6 +582,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A boolean mPauseSchedulePendingForPip = false; // Gets set to indicate that the activity is currently being auto-pipped. boolean mAutoEnteringPip = false; private void updateEnterpriseThumbnailDrawable(Context context) { DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); mEnterpriseThumbnailDrawable = dpm.getResources().getDrawable( Loading Loading @@ -6099,8 +6102,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A try { mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token, PauseActivityItem.obtain(finishing, false /* userLeaving */, configChangeFlags, false /* dontReport */, false /* autoEnteringPip */)); configChangeFlags, false /* dontReport */, mAutoEnteringPip)); } catch (Exception e) { Slog.w(TAG, "Exception thrown sending pause: " + intent.getComponent(), e); } Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +9 −1 Original line number Diff line number Diff line Loading @@ -3592,15 +3592,21 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } boolean enterPictureInPictureMode(@NonNull ActivityRecord r, @NonNull PictureInPictureParams params, boolean fromClient) { return enterPictureInPictureMode(r, params, fromClient, false /* isAutoEnter */); } /** * Puts the given activity in picture in picture mode if possible. * * @param fromClient true if this comes from a client call (eg. Activity.enterPip). * @param isAutoEnter true if this comes from an automatic pip-enter. * @return true if the activity is now in picture-in-picture mode, or false if it could not * enter picture-in-picture mode. */ boolean enterPictureInPictureMode(@NonNull ActivityRecord r, @NonNull PictureInPictureParams params, boolean fromClient) { @NonNull PictureInPictureParams params, boolean fromClient, boolean isAutoEnter) { // If the activity is already in picture in picture mode, then just return early if (r.inPinnedWindowingMode()) { return true; Loading Loading @@ -3635,6 +3641,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { return; } r.setPictureInPictureParams(params); r.mAutoEnteringPip = isAutoEnter; mRootWindowContainer.moveActivityToPinnedRootTask(r, null /* launchIntoPipHostActivity */, "enterPictureInPictureMode", transition); Loading @@ -3643,6 +3650,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { r.getTask().schedulePauseActivity(r, false /* userLeaving */, false /* pauseImmediately */, true /* autoEnteringPip */, "auto-pip"); } r.mAutoEnteringPip = false; } }; Loading services/core/java/com/android/server/wm/Transition.java +1 −1 Original line number Diff line number Diff line Loading @@ -963,7 +963,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return false; } return mController.mAtm.enterPictureInPictureMode(ar, ar.pictureInPictureArgs, false /* fromClient */); false /* fromClient */, true /* isAutoEnter */); } // Legacy pip-entry (not via isAutoEnterEnabled). Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +4 −2 Original line number Diff line number Diff line Loading @@ -582,6 +582,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A boolean mPauseSchedulePendingForPip = false; // Gets set to indicate that the activity is currently being auto-pipped. boolean mAutoEnteringPip = false; private void updateEnterpriseThumbnailDrawable(Context context) { DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); mEnterpriseThumbnailDrawable = dpm.getResources().getDrawable( Loading Loading @@ -6099,8 +6102,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A try { mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token, PauseActivityItem.obtain(finishing, false /* userLeaving */, configChangeFlags, false /* dontReport */, false /* autoEnteringPip */)); configChangeFlags, false /* dontReport */, mAutoEnteringPip)); } catch (Exception e) { Slog.w(TAG, "Exception thrown sending pause: " + intent.getComponent(), e); } Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +9 −1 Original line number Diff line number Diff line Loading @@ -3592,15 +3592,21 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } boolean enterPictureInPictureMode(@NonNull ActivityRecord r, @NonNull PictureInPictureParams params, boolean fromClient) { return enterPictureInPictureMode(r, params, fromClient, false /* isAutoEnter */); } /** * Puts the given activity in picture in picture mode if possible. * * @param fromClient true if this comes from a client call (eg. Activity.enterPip). * @param isAutoEnter true if this comes from an automatic pip-enter. * @return true if the activity is now in picture-in-picture mode, or false if it could not * enter picture-in-picture mode. */ boolean enterPictureInPictureMode(@NonNull ActivityRecord r, @NonNull PictureInPictureParams params, boolean fromClient) { @NonNull PictureInPictureParams params, boolean fromClient, boolean isAutoEnter) { // If the activity is already in picture in picture mode, then just return early if (r.inPinnedWindowingMode()) { return true; Loading Loading @@ -3635,6 +3641,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { return; } r.setPictureInPictureParams(params); r.mAutoEnteringPip = isAutoEnter; mRootWindowContainer.moveActivityToPinnedRootTask(r, null /* launchIntoPipHostActivity */, "enterPictureInPictureMode", transition); Loading @@ -3643,6 +3650,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { r.getTask().schedulePauseActivity(r, false /* userLeaving */, false /* pauseImmediately */, true /* autoEnteringPip */, "auto-pip"); } r.mAutoEnteringPip = false; } }; Loading
services/core/java/com/android/server/wm/Transition.java +1 −1 Original line number Diff line number Diff line Loading @@ -963,7 +963,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return false; } return mController.mAtm.enterPictureInPictureMode(ar, ar.pictureInPictureArgs, false /* fromClient */); false /* fromClient */, true /* isAutoEnter */); } // Legacy pip-entry (not via isAutoEnterEnabled). Loading