Merge "Dismiss dream with launchTaskBehind" into rvc-dev am: 9af8e3f155

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11867454

Change-Id: Icebd83925319ec544faca73e1dedd3586d8a9c15
This commit is contained in:
TreeHugger Robot
2020-06-25 21:39:21 +00:00
committed by Automerger Merge Worker
2 changed files with 15 additions and 1 deletions

View File

@@ -1668,6 +1668,12 @@ class ActivityStarter {
mTargetStack.setAlwaysOnTop(true); mTargetStack.setAlwaysOnTop(true);
} }
} }
if (!mTargetStack.isTopStackInDisplayArea() && mService.mInternal.isDreaming()) {
// Launching underneath dream activity (fullscreen, always-on-top). Run the launch-
// -behind transition so the Activity gets created and starts in visible state.
mLaunchTaskBehind = true;
r.mLaunchTaskBehind = true;
}
} }
mService.mUgmInternal.grantUriPermissionUncheckedFromIntent(intentGrants, mService.mUgmInternal.grantUriPermissionUncheckedFromIntent(intentGrants,
@@ -1917,6 +1923,12 @@ class ActivityStarter {
return START_SUCCESS; return START_SUCCESS;
} }
// At this point we are certain we want the task moved to the front. If we need to dismiss
// any other always-on-top stacks, now is the time to do it.
if (targetTaskTop.canTurnScreenOn() && mService.mInternal.isDreaming()) {
targetTaskTop.mStackSupervisor.wakeUp("recycleTask#turnScreenOnFlag");
}
if (mMovedToFront) { if (mMovedToFront) {
// We moved the task to front, use starting window to hide initial drawn delay. // We moved the task to front, use starting window to hide initial drawn delay.
targetTaskTop.showStartingWindow(null /* prev */, false /* newTask */, targetTaskTop.showStartingWindow(null /* prev */, false /* newTask */,

View File

@@ -2696,7 +2696,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
Settings.Global.THEATER_MODE_ON, 0) == 0; Settings.Global.THEATER_MODE_ON, 0) == 0;
boolean canTurnScreenOn = mActivityRecord == null || mActivityRecord.currentLaunchCanTurnScreenOn(); boolean canTurnScreenOn = mActivityRecord == null || mActivityRecord.currentLaunchCanTurnScreenOn();
if (allowTheaterMode && canTurnScreenOn && !mPowerManagerWrapper.isInteractive()) { if (allowTheaterMode && canTurnScreenOn
&& (mWmService.mAtmInternal.isDreaming()
|| !mPowerManagerWrapper.isInteractive())) {
if (DEBUG_VISIBILITY || DEBUG_POWER) { if (DEBUG_VISIBILITY || DEBUG_POWER) {
Slog.v(TAG, "Relayout window turning screen on: " + this); Slog.v(TAG, "Relayout window turning screen on: " + this);
} }