Merge "Don't try to auto-pip if there's already a pip" into udc-dev
This commit is contained in:
@@ -954,6 +954,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
// to the transient activity.
|
// to the transient activity.
|
||||||
ar.supportsEnterPipOnTaskSwitch = true;
|
ar.supportsEnterPipOnTaskSwitch = true;
|
||||||
}
|
}
|
||||||
|
// Make sure this activity can enter pip under the current circumstances.
|
||||||
|
// `enterPictureInPicture` internally checks, but with beforeStopping=false which
|
||||||
|
// is specifically for non-auto-enter.
|
||||||
|
if (!ar.checkEnterPictureInPictureState("enterPictureInPictureMode",
|
||||||
|
true /* beforeStopping */)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return mController.mAtm.enterPictureInPictureMode(ar, ar.pictureInPictureArgs,
|
return mController.mAtm.enterPictureInPictureMode(ar, ar.pictureInPictureArgs,
|
||||||
false /* fromClient */);
|
false /* fromClient */);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -813,6 +813,10 @@ class TransitionController {
|
|||||||
}
|
}
|
||||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Finish Transition: %s", record);
|
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Finish Transition: %s", record);
|
||||||
mPlayingTransitions.remove(record);
|
mPlayingTransitions.remove(record);
|
||||||
|
if (!inTransition()) {
|
||||||
|
// reset track-count now since shell-side is idle.
|
||||||
|
mTrackCount = 0;
|
||||||
|
}
|
||||||
updateRunningRemoteAnimation(record, false /* isPlaying */);
|
updateRunningRemoteAnimation(record, false /* isPlaying */);
|
||||||
record.finishTransition();
|
record.finishTransition();
|
||||||
for (int i = mAnimatingExitWindows.size() - 1; i >= 0; i--) {
|
for (int i = mAnimatingExitWindows.size() - 1; i >= 0; i--) {
|
||||||
@@ -825,10 +829,9 @@ class TransitionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mRunningLock.doNotifyLocked();
|
mRunningLock.doNotifyLocked();
|
||||||
// Run state-validation checks when no transitions are active anymore.
|
// Run state-validation checks when no transitions are active anymore (Note: sometimes
|
||||||
|
// finish can start a transition, so check afterwards -- eg. pip).
|
||||||
if (!inTransition()) {
|
if (!inTransition()) {
|
||||||
// Can reset track-count now that everything is idle.
|
|
||||||
mTrackCount = 0;
|
|
||||||
validateStates();
|
validateStates();
|
||||||
mAtm.mWindowManager.onAnimationFinished();
|
mAtm.mWindowManager.onAnimationFinished();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user