Merge "Stop animation when screen times out and the user turns on the phone." into sc-dev am: d80badd6d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14964843 Change-Id: I99b7f6d18cedde73fbcf8bda5406bc9dc173995e
This commit is contained in:
@@ -221,6 +221,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
|
|||||||
// transaction from the global transaction.
|
// transaction from the global transaction.
|
||||||
private final SurfaceControl.Transaction mDisplayTransaction;
|
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 */
|
/** The token acquirer to put root tasks on the displays to sleep */
|
||||||
final ActivityTaskManagerInternal.SleepTokenAcquirer mDisplayOffTokenAcquirer;
|
final ActivityTaskManagerInternal.SleepTokenAcquirer mDisplayOffTokenAcquirer;
|
||||||
|
|
||||||
@@ -450,7 +453,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
|
|||||||
mService = service.mAtmService;
|
mService = service.mAtmService;
|
||||||
mTaskSupervisor = mService.mTaskSupervisor;
|
mTaskSupervisor = mService.mTaskSupervisor;
|
||||||
mTaskSupervisor.mRootWindowContainer = this;
|
mTaskSupervisor.mRootWindowContainer = this;
|
||||||
mDisplayOffTokenAcquirer = mService.new SleepTokenAcquirerImpl("Display-off");
|
mDisplayOffTokenAcquirer = mService.new SleepTokenAcquirerImpl(DISPLAY_OFF_SLEEP_TOKEN_TAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean updateFocusedWindowLocked(int mode, boolean updateInputWindows) {
|
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));
|
Slog.d(TAG, "Remove non-exist sleep token: " + token + " from " + Debug.getCallers(6));
|
||||||
}
|
}
|
||||||
mSleepTokens.remove(token.mHashKey);
|
mSleepTokens.remove(token.mHashKey);
|
||||||
|
|
||||||
final DisplayContent display = getDisplayContent(token.mDisplayId);
|
final DisplayContent display = getDisplayContent(token.mDisplayId);
|
||||||
if (display != null) {
|
if (display != null) {
|
||||||
display.mAllSleepTokens.remove(token);
|
display.mAllSleepTokens.remove(token);
|
||||||
if (display.mAllSleepTokens.isEmpty()) {
|
if (display.mAllSleepTokens.isEmpty()) {
|
||||||
mService.updateSleepIfNeededLocked();
|
mService.updateSleepIfNeededLocked();
|
||||||
|
if (token.mTag.equals(DISPLAY_OFF_SLEEP_TOKEN_TAG)) {
|
||||||
|
display.mSkipAppTransitionAnimation = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user