Merge "Call with Shell transition for TRANSIT_KEYGUARD_OCCLUDE/UNOCCLUDE" into sc-v2-dev

This commit is contained in:
Chris Li
2021-08-03 04:58:30 +00:00
committed by Android (Google) Code Review
4 changed files with 12 additions and 6 deletions

View File

@@ -4984,10 +4984,18 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
} }
} }
/**
* @deprecated new transition should use {@link #requestTransitionAndLegacyPrepare(int, int)}
*/
@Deprecated
void prepareAppTransition(@WindowManager.TransitionType int transit) { void prepareAppTransition(@WindowManager.TransitionType int transit) {
prepareAppTransition(transit, 0 /* flags */); prepareAppTransition(transit, 0 /* flags */);
} }
/**
* @deprecated new transition should use {@link #requestTransitionAndLegacyPrepare(int, int)}
*/
@Deprecated
void prepareAppTransition(@WindowManager.TransitionType int transit, void prepareAppTransition(@WindowManager.TransitionType int transit,
@WindowManager.TransitionFlags int flags) { @WindowManager.TransitionFlags int flags) {
final boolean prepared = mAppTransition.prepareAppTransition(transit, flags); final boolean prepared = mAppTransition.prepareAppTransition(transit, flags);
@@ -5000,7 +5008,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
* Helper that both requests a transition (using the new transition system) and prepares * Helper that both requests a transition (using the new transition system) and prepares
* the legacy transition system. Use this when both systems have the same start-point. * the legacy transition system. Use this when both systems have the same start-point.
* *
* @see TransitionController#requestTransitionIfNeeded(int, int, WindowContainer) * @see TransitionController#requestTransitionIfNeeded(int, int, WindowContainer,
* WindowContainer)
* @see AppTransition#prepareAppTransition * @see AppTransition#prepareAppTransition
*/ */
void requestTransitionAndLegacyPrepare(@WindowManager.TransitionType int transit, void requestTransitionAndLegacyPrepare(@WindowManager.TransitionType int transit,

View File

@@ -378,10 +378,10 @@ class KeyguardController {
mService.deferWindowLayout(); mService.deferWindowLayout();
try { try {
mRootWindowContainer.getDefaultDisplay() mRootWindowContainer.getDefaultDisplay()
.prepareAppTransition( .requestTransitionAndLegacyPrepare(
isDisplayOccluded(DEFAULT_DISPLAY) isDisplayOccluded(DEFAULT_DISPLAY)
? TRANSIT_KEYGUARD_OCCLUDE ? TRANSIT_KEYGUARD_OCCLUDE
: TRANSIT_KEYGUARD_UNOCCLUDE); : TRANSIT_KEYGUARD_UNOCCLUDE, 0 /* flags */);
// When the occluding activity also turns on the display, visibility of the activity // When the occluding activity also turns on the display, visibility of the activity
// can be committed before KEYGUARD_OCCLUDE transition is handled. // can be committed before KEYGUARD_OCCLUDE transition is handled.
// Set mRequestForceTransition flag to make sure that the app transition animation // Set mRequestForceTransition flag to make sure that the app transition animation

View File

@@ -2811,7 +2811,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
Slog.w(TAG, " Force finishing activity " Slog.w(TAG, " Force finishing activity "
+ r.intent.getComponent().flattenToShortString()); + r.intent.getComponent().flattenToShortString());
r.detachFromProcess(); r.detachFromProcess();
r.mDisplayContent.prepareAppTransition(TRANSIT_CLOSE, TRANSIT_FLAG_APP_CRASHED);
r.mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_CLOSE, r.mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_CLOSE,
TRANSIT_FLAG_APP_CRASHED); TRANSIT_FLAG_APP_CRASHED);
r.destroyIfPossible("handleAppCrashed"); r.destroyIfPossible("handleAppCrashed");

View File

@@ -5266,7 +5266,6 @@ class Task extends TaskFragment {
Slog.w(TAG, " Force finishing activity " Slog.w(TAG, " Force finishing activity "
+ r.intent.getComponent().flattenToShortString()); + r.intent.getComponent().flattenToShortString());
Task finishedTask = r.getTask(); Task finishedTask = r.getTask();
mDisplayContent.prepareAppTransition(TRANSIT_CLOSE, TRANSIT_FLAG_APP_CRASHED);
mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_CLOSE, TRANSIT_FLAG_APP_CRASHED); mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_CLOSE, TRANSIT_FLAG_APP_CRASHED);
r.finishIfPossible(reason, false /* oomAdj */); r.finishIfPossible(reason, false /* oomAdj */);
@@ -5646,7 +5645,6 @@ class Task extends TaskFragment {
// Skip the transition for pinned task. // Skip the transition for pinned task.
if (!inPinnedWindowingMode()) { if (!inPinnedWindowingMode()) {
mDisplayContent.prepareAppTransition(TRANSIT_TO_BACK);
mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_TO_BACK, tr); mDisplayContent.requestTransitionAndLegacyPrepare(TRANSIT_TO_BACK, tr);
} }
moveToBack("moveTaskToBackLocked", tr); moveToBack("moveTaskToBackLocked", tr);