diff options
| author | 2021-06-24 13:51:12 +0000 | |
|---|---|---|
| committer | 2021-06-24 13:51:12 +0000 | |
| commit | d80badd6d68733d85c4ce5efe9e13f2f8469d007 (patch) | |
| tree | 3265ae96360e8998fa7b3ba4956a6ddc5637a8fe | |
| parent | 43aeef53ea84cb1b3fdad2680a80814edd8a9f68 (diff) | |
| parent | c0095e5184d1c33a79f6805f7227283ced96b856 (diff) | |
Merge "Stop animation when screen times out and the user turns on the phone." into sc-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/RootWindowContainer.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index c510603d1d7d..bc2556a5a497 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -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) { @@ -2654,12 +2657,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; + } } } } |