Merge "Ensure applying saved fraction when re-entering PiP"

This commit is contained in:
TreeHugger Robot
2019-07-23 20:56:28 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 8 deletions

View File

@@ -1015,6 +1015,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
void notifyAppStopped() {
if (DEBUG_ADD_REMOVE) Slog.v(TAG, "notifyAppStopped: " + this);
mAppStopped = true;
// Reset the last saved PiP snap fraction on app stop.
mDisplayContent.mPinnedStackControllerLocked.resetReentrySnapFraction(this);
destroySurfaces();
// Remove any starting window that was added for this app if they are still around.
removeStartingWindow();
@@ -3076,11 +3078,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
@Override
void setHidden(boolean hidden) {
super.setHidden(hidden);
if (hidden) {
// Once the app window is hidden, reset the last saved PiP snap fraction
mDisplayContent.mPinnedStackControllerLocked.resetReentrySnapFraction(this);
}
scheduleAnimation();
}

View File

@@ -321,7 +321,9 @@ public class TaskStack extends WindowContainer<Task> implements
*/
private void setAnimationFinalBounds(Rect sourceHintBounds, Rect destBounds,
boolean toFullscreen) {
mBoundsAnimatingRequested = true;
if (mAnimationType == BoundsAnimationController.BOUNDS) {
mBoundsAnimatingRequested = true;
}
mBoundsAnimatingToFullscreen = toFullscreen;
if (destBounds != null) {
mBoundsAnimationTarget.set(destBounds);
@@ -1586,8 +1588,10 @@ public class TaskStack extends WindowContainer<Task> implements
return false;
}
mBoundsAnimatingRequested = false;
mBoundsAnimating = true;
if (animationType == BoundsAnimationController.BOUNDS) {
mBoundsAnimatingRequested = false;
mBoundsAnimating = true;
}
mAnimationType = animationType;
// If we are changing UI mode, as in the PiP to fullscreen