Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 573654ba authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Pause is getting scheduled 2 times" am: d1c32f2c am: a7bdc3fd

parents f5fe4bf2 a7bdc3fd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -567,6 +567,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

    Drawable mEnterpriseThumbnailDrawable;

    boolean mPauseSchedulePendingForPip = false;

    private void updateEnterpriseThumbnailDrawable(Context context) {
        DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class);
        mEnterpriseThumbnailDrawable = dpm.getResources().getDrawable(
+1 −1
Original line number Diff line number Diff line
@@ -3573,7 +3573,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                        null /* launchIntoPipHostActivity */, "enterPictureInPictureMode",
                        transition);
                // Continue the pausing process after entering pip.
                if (r.isState(PAUSING)) {
                if (r.isState(PAUSING) && r.mPauseSchedulePendingForPip) {
                    r.getTask().schedulePauseActivity(r, false /* userLeaving */,
                            false /* pauseImmediately */, true /* autoEnteringPip */, "auto-pip");
                }
+2 −0
Original line number Diff line number Diff line
@@ -1656,6 +1656,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {

        if (prev.attachedToProcess()) {
            if (shouldAutoPip) {
                prev.mPauseSchedulePendingForPip = true;
                boolean didAutoPip = mAtmService.enterPictureInPictureMode(
                        prev, prev.pictureInPictureArgs, false /* fromClient */);
                ProtoLog.d(WM_DEBUG_STATES, "Auto-PIP allowed, entering PIP mode "
@@ -1719,6 +1720,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {
            boolean pauseImmediately, boolean autoEnteringPip, String reason) {
        ProtoLog.v(WM_DEBUG_STATES, "Enqueueing pending pause: %s", prev);
        try {
            prev.mPauseSchedulePendingForPip = false;
            EventLogTags.writeWmPauseActivity(prev.mUserId, System.identityHashCode(prev),
                    prev.shortComponentName, "userLeaving=" + userLeaving, reason);