Merge "Prevent recents from closing while moving PiP to fullscreen." into nyc-dev
This commit is contained in:
@@ -276,9 +276,6 @@ public class PipManager {
|
|||||||
void movePipToFullscreen() {
|
void movePipToFullscreen() {
|
||||||
mState = STATE_NO_PIP;
|
mState = STATE_NO_PIP;
|
||||||
mPipTaskId = TASK_ID_NO_PIP;
|
mPipTaskId = TASK_ID_NO_PIP;
|
||||||
for (int i = mListeners.size() - 1; i >= 0; --i) {
|
|
||||||
mListeners.get(i).onMoveToFullscreen();
|
|
||||||
}
|
|
||||||
resizePinnedStack(mState);
|
resizePinnedStack(mState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,6 +635,11 @@ public class PipManager {
|
|||||||
public void onPinnedStackAnimationEnded() {
|
public void onPinnedStackAnimationEnded() {
|
||||||
if (DEBUG) Log.d(TAG, "onPinnedStackAnimationEnded()");
|
if (DEBUG) Log.d(TAG, "onPinnedStackAnimationEnded()");
|
||||||
switch (mState) {
|
switch (mState) {
|
||||||
|
case STATE_NO_PIP:
|
||||||
|
for (int i = mListeners.size() - 1; i >= 0; --i) {
|
||||||
|
mListeners.get(i).onMoveToFullscreen();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case STATE_PIP_OVERLAY:
|
case STATE_PIP_OVERLAY:
|
||||||
if (!mPipRecentsOverlayManager.isRecentsShown()) {
|
if (!mPipRecentsOverlayManager.isRecentsShown()) {
|
||||||
showPipOverlay();
|
showPipOverlay();
|
||||||
|
|||||||
@@ -149,11 +149,15 @@ public class BoundsAnimationController {
|
|||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
if (DEBUG) Slog.d(TAG, "onAnimationEnd: mTarget=" + mTarget
|
if (DEBUG) Slog.d(TAG, "onAnimationEnd: mTarget=" + mTarget
|
||||||
+ " mMoveToFullScreen=" + mMoveToFullScreen + " mWillReplace=" + mWillReplace);
|
+ " mMoveToFullScreen=" + mMoveToFullScreen + " mWillReplace=" + mWillReplace);
|
||||||
|
|
||||||
finishAnimation();
|
|
||||||
if (mMoveToFullScreen && !mWillReplace) {
|
if (mMoveToFullScreen && !mWillReplace) {
|
||||||
mTarget.moveToFullscreen();
|
mTarget.moveToFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we finish the animation before we move the target to fullscreen,
|
||||||
|
// recents may close itself and we may try and resume the previous
|
||||||
|
// fullscreen app leading to churn and flicker after we then move
|
||||||
|
// our target to fullscreen.
|
||||||
|
finishAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user