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

Commit 0a12449f authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Stop animation when screen times out and the user turns on the...

Merge "Merge "Stop animation when screen times out and the user turns on the phone." into sc-dev am: d80badd6 am: a636917f" into sc-v2-dev-plus-aosp
parents 8da4065b 3f249430
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -221,6 +221,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
    // transaction from the global transaction.
    private final SurfaceControl.Transaction mDisplayTransaction;

    // The tag for the token to put root tasks on the displays to sleep.
    private static final String DISPLAY_OFF_SLEEP_TOKEN_TAG = "Display-off";

    /** The token acquirer to put root tasks on the displays to sleep */
    final ActivityTaskManagerInternal.SleepTokenAcquirer mDisplayOffTokenAcquirer;

@@ -450,7 +453,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
        mService = service.mAtmService;
        mTaskSupervisor = mService.mTaskSupervisor;
        mTaskSupervisor.mRootWindowContainer = this;
        mDisplayOffTokenAcquirer = mService.new SleepTokenAcquirerImpl("Display-off");
        mDisplayOffTokenAcquirer = mService.new SleepTokenAcquirerImpl(DISPLAY_OFF_SLEEP_TOKEN_TAG);
    }

    boolean updateFocusedWindowLocked(int mode, boolean updateInputWindows) {
@@ -2657,12 +2660,14 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
            Slog.d(TAG, "Remove non-exist sleep token: " + token + " from " + Debug.getCallers(6));
        }
        mSleepTokens.remove(token.mHashKey);

        final DisplayContent display = getDisplayContent(token.mDisplayId);
        if (display != null) {
            display.mAllSleepTokens.remove(token);
            if (display.mAllSleepTokens.isEmpty()) {
                mService.updateSleepIfNeededLocked();
                if (token.mTag.equals(DISPLAY_OFF_SLEEP_TOKEN_TAG)) {
                    display.mSkipAppTransitionAnimation = true;
                }
            }
        }
    }