Loading services/core/java/com/android/server/wm/DisplayContent.java +11 −0 Original line number Diff line number Diff line Loading @@ -6530,6 +6530,17 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp && (mAtmService.mRunningVoice == null); } /** Returns {@code} if the screen is not in a fully interactive state. */ boolean isScreenSleeping() { for (int i = mAllSleepTokens.size() - 1; i >= 0; i--) { if (mAllSleepTokens.get(i).isScreenOff()) { return true; } } // If AOD is active, there may be only keyguard sleep token but awake state is false. // Then still treat the case as sleeping. return !mAllSleepTokens.isEmpty() && !mDisplayPolicy.isAwake(); } void ensureActivitiesVisible(ActivityRecord starting, boolean notifyClients) { if (mInEnsureActivitiesVisible) { Loading services/core/java/com/android/server/wm/RootWindowContainer.java +6 −2 Original line number Diff line number Diff line Loading @@ -2559,8 +2559,8 @@ class RootWindowContainer extends WindowContainer<DisplayContent> if (display.mTransitionController.isShellTransitionsEnabled() && !scheduledSleepTransition // Only care if there are actual sleep tokens. && displayShouldSleep && !display.mAllSleepTokens.isEmpty()) { // Only care if there are actual sleep states. && displayShouldSleep && display.isScreenSleeping()) { scheduledSleepTransition = true; if (!mHandler.hasMessages(MSG_SEND_SLEEP_TRANSITION)) { Loading Loading @@ -3885,6 +3885,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent> mHashKey = makeSleepTokenKey(mTag, mDisplayId); } boolean isScreenOff() { return DISPLAY_OFF_SLEEP_TOKEN_TAG.equals(mTag); } @Override public String toString() { return "{\"" + mTag + "\", display " + mDisplayId Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +11 −0 Original line number Diff line number Diff line Loading @@ -6530,6 +6530,17 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp && (mAtmService.mRunningVoice == null); } /** Returns {@code} if the screen is not in a fully interactive state. */ boolean isScreenSleeping() { for (int i = mAllSleepTokens.size() - 1; i >= 0; i--) { if (mAllSleepTokens.get(i).isScreenOff()) { return true; } } // If AOD is active, there may be only keyguard sleep token but awake state is false. // Then still treat the case as sleeping. return !mAllSleepTokens.isEmpty() && !mDisplayPolicy.isAwake(); } void ensureActivitiesVisible(ActivityRecord starting, boolean notifyClients) { if (mInEnsureActivitiesVisible) { Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +6 −2 Original line number Diff line number Diff line Loading @@ -2559,8 +2559,8 @@ class RootWindowContainer extends WindowContainer<DisplayContent> if (display.mTransitionController.isShellTransitionsEnabled() && !scheduledSleepTransition // Only care if there are actual sleep tokens. && displayShouldSleep && !display.mAllSleepTokens.isEmpty()) { // Only care if there are actual sleep states. && displayShouldSleep && display.isScreenSleeping()) { scheduledSleepTransition = true; if (!mHandler.hasMessages(MSG_SEND_SLEEP_TRANSITION)) { Loading Loading @@ -3885,6 +3885,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent> mHashKey = makeSleepTokenKey(mTag, mDisplayId); } boolean isScreenOff() { return DISPLAY_OFF_SLEEP_TOKEN_TAG.equals(mTag); } @Override public String toString() { return "{\"" + mTag + "\", display " + mDisplayId Loading