Merge "Request transition for corner case of keyguard state" into udc-dev
This commit is contained in:
@@ -5266,10 +5266,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
mTransitionController.collect(this);
|
||||
} else {
|
||||
inFinishingTransition = mTransitionController.inFinishingTransition(this);
|
||||
if (!inFinishingTransition) {
|
||||
if (!inFinishingTransition && !mDisplayContent.isSleeping()) {
|
||||
Slog.e(TAG, "setVisibility=" + visible
|
||||
+ " while transition is not collecting or finishing "
|
||||
+ this + " caller=" + Debug.getCallers(8));
|
||||
// Force showing the parents because they may be hidden by previous transition.
|
||||
if (visible) {
|
||||
final Transaction t = getSyncTransaction();
|
||||
for (WindowContainer<?> p = getParent(); p != null && p != mDisplayContent;
|
||||
p = p.getParent()) {
|
||||
if (p.mSurfaceControl != null) {
|
||||
t.show(p.mSurfaceControl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2349,12 +2349,23 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
|
||||
}
|
||||
|
||||
// Prepare transition before resume top activity, so it can be collected.
|
||||
if (!displayShouldSleep && display.isDefaultDisplay
|
||||
&& !display.getDisplayPolicy().isAwake()
|
||||
&& display.mTransitionController.isShellTransitionsEnabled()
|
||||
if (!displayShouldSleep && display.mTransitionController.isShellTransitionsEnabled()
|
||||
&& !display.mTransitionController.isCollecting()) {
|
||||
display.mTransitionController.requestTransitionIfNeeded(TRANSIT_WAKE,
|
||||
0 /* flags */, null /* trigger */, display);
|
||||
int transit = TRANSIT_NONE;
|
||||
if (!display.getDisplayPolicy().isAwake()) {
|
||||
// Note that currently this only happens on default display because non-default
|
||||
// display is always awake.
|
||||
transit = TRANSIT_WAKE;
|
||||
} else if (display.isKeyguardOccluded()) {
|
||||
// The display was awake so this is resuming activity for occluding keyguard.
|
||||
transit = WindowManager.TRANSIT_KEYGUARD_OCCLUDE;
|
||||
}
|
||||
if (transit != TRANSIT_NONE) {
|
||||
display.mTransitionController.requestStartTransition(
|
||||
display.mTransitionController.createTransition(transit),
|
||||
null /* startTask */, null /* remoteTransition */,
|
||||
null /* displayChange */);
|
||||
}
|
||||
}
|
||||
// Set the sleeping state of the root tasks on the display.
|
||||
display.forAllRootTasks(rootTask -> {
|
||||
|
||||
Reference in New Issue
Block a user