Fix swipe up show-when-locked activity
The change of mFlags after calculateTransitionInfo won't be assigned to TransitionInfo. Bug: 261418859 Test: Swipe up a show-when-locked activity on keyguard. Change-Id: I0fd851c3c80d12528eee0bf1d5bb89dc2bc2f55a
This commit is contained in:
@@ -1106,12 +1106,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
// needs to be updated for STATE_ABORT.
|
||||
commitVisibleActivities(transaction);
|
||||
|
||||
// Fall-back to the default display if there isn't one participating.
|
||||
final DisplayContent primaryDisplay = !mTargetDisplays.isEmpty() ? mTargetDisplays.get(0)
|
||||
: mController.mAtm.mRootWindowContainer.getDefaultDisplay();
|
||||
|
||||
if (mState == STATE_ABORT) {
|
||||
mController.abort(this);
|
||||
// Fall-back to the default display if there isn't one participating.
|
||||
final DisplayContent dc = !mTargetDisplays.isEmpty() ? mTargetDisplays.get(0)
|
||||
: mController.mAtm.mRootWindowContainer.getDefaultDisplay();
|
||||
dc.getPendingTransaction().merge(transaction);
|
||||
primaryDisplay.getPendingTransaction().merge(transaction);
|
||||
mSyncId = -1;
|
||||
mOverrideOptions = null;
|
||||
cleanUpInternal();
|
||||
@@ -1123,6 +1124,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
mFinishTransaction = mController.mAtm.mWindowManager.mTransactionFactory.get();
|
||||
mController.moveToPlaying(this);
|
||||
|
||||
// Flags must be assigned before calculateTransitionInfo. Otherwise it won't take effect.
|
||||
if (primaryDisplay.isKeyguardLocked()) {
|
||||
mFlags |= TRANSIT_FLAG_KEYGUARD_LOCKED;
|
||||
}
|
||||
// Check whether the participants were animated from back navigation.
|
||||
final boolean markBackAnimated = mController.mAtm.mBackNavigationController
|
||||
.containsBackAnimationTargets(this);
|
||||
@@ -1136,9 +1141,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
final DisplayContent dc = mController.mAtm.mRootWindowContainer.getDisplayContent(
|
||||
info.getRoot(i).getDisplayId());
|
||||
mTargetDisplays.add(dc);
|
||||
if (dc.isKeyguardLocked()) {
|
||||
mFlags |= TRANSIT_FLAG_KEYGUARD_LOCKED;
|
||||
}
|
||||
}
|
||||
|
||||
if (markBackAnimated) {
|
||||
|
||||
Reference in New Issue
Block a user