Merge "Freezing screen when dismiss pip if orientation is going to change." into qt-r1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
41b006d8d6
@@ -5651,13 +5651,20 @@ class ActivityStack extends ConfigurationContainer {
|
|||||||
void animateResizePinnedStack(Rect sourceHintBounds, Rect toBounds, int animationDuration,
|
void animateResizePinnedStack(Rect sourceHintBounds, Rect toBounds, int animationDuration,
|
||||||
boolean fromFullscreen) {
|
boolean fromFullscreen) {
|
||||||
if (!inPinnedWindowingMode()) return;
|
if (!inPinnedWindowingMode()) return;
|
||||||
if (skipResizeAnimation(toBounds == null /* toFullscreen */)) {
|
if (toBounds == null /* toFullscreen */) {
|
||||||
mService.moveTasksToFullscreenStack(mStackId, true /* onTop */);
|
final Configuration parentConfig = getParent().getConfiguration();
|
||||||
} else {
|
final ActivityRecord top = topRunningNonOverlayTaskActivity();
|
||||||
if (getTaskStack() == null) return;
|
if (top != null && !top.isConfigurationCompatible(parentConfig)) {
|
||||||
getTaskStack().animateResizePinnedStack(toBounds, sourceHintBounds,
|
// The final orientation of this activity will change after moving to full screen.
|
||||||
animationDuration, fromFullscreen);
|
// Start freezing screen here to prevent showing a temporary full screen window.
|
||||||
|
top.startFreezingScreenLocked(top.app, CONFIG_SCREEN_LAYOUT);
|
||||||
|
mService.moveTasksToFullscreenStack(mStackId, true /* onTop */);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (getTaskStack() == null) return;
|
||||||
|
getTaskStack().animateResizePinnedStack(toBounds, sourceHintBounds,
|
||||||
|
animationDuration, fromFullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -5673,15 +5680,6 @@ class ActivityStack extends ConfigurationContainer {
|
|||||||
stack.getAnimationOrCurrentBounds(outBounds);
|
stack.getAnimationOrCurrentBounds(outBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean skipResizeAnimation(boolean toFullscreen) {
|
|
||||||
if (!toFullscreen) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Configuration parentConfig = getParent().getConfiguration();
|
|
||||||
final ActivityRecord top = topRunningNonOverlayTaskActivity();
|
|
||||||
return top != null && !top.isConfigurationCompatible(parentConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setPictureInPictureAspectRatio(float aspectRatio) {
|
void setPictureInPictureAspectRatio(float aspectRatio) {
|
||||||
if (getTaskStack() == null) return;
|
if (getTaskStack() == null) return;
|
||||||
getTaskStack().setPictureInPictureAspectRatio(aspectRatio);
|
getTaskStack().setPictureInPictureAspectRatio(aspectRatio);
|
||||||
|
|||||||
Reference in New Issue
Block a user