Merge "Disable rounded corners when in multi window" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-03 08:06:24 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 2 deletions

View File

@@ -2557,12 +2557,17 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
final Animation a = loadAnimation(lp, transit, enter, isVoiceInteraction); final Animation a = loadAnimation(lp, transit, enter, isVoiceInteraction);
if (a != null) { if (a != null) {
// Only apply corner radius to animation if we're not in multi window mode.
// We don't want rounded corners when in pip or split screen.
final float windowCornerRadius = !inMultiWindowMode()
? getDisplayContent().getWindowCornerRadius()
: 0;
adapter = new LocalAnimationAdapter( adapter = new LocalAnimationAdapter(
new WindowAnimationSpec(a, mTmpPoint, mTmpRect, new WindowAnimationSpec(a, mTmpPoint, mTmpRect,
getDisplayContent().mAppTransition.canSkipFirstFrame(), getDisplayContent().mAppTransition.canSkipFirstFrame(),
appStackClipMode, appStackClipMode,
true /* isAppAnimation */, true /* isAppAnimation */,
getDisplayContent().getWindowCornerRadius()), windowCornerRadius),
mWmService.mSurfaceAnimationRunner); mWmService.mSurfaceAnimationRunner);
if (a.getZAdjustment() == Animation.ZORDER_TOP) { if (a.getZAdjustment() == Animation.ZORDER_TOP) {
mNeedsZBoost = true; mNeedsZBoost = true;

View File

@@ -4599,7 +4599,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
anim.scaleCurrentDuration(mWmService.getWindowAnimationScaleLocked()); anim.scaleCurrentDuration(mWmService.getWindowAnimationScaleLocked());
final AnimationAdapter adapter = new LocalAnimationAdapter( final AnimationAdapter adapter = new LocalAnimationAdapter(
new WindowAnimationSpec(anim, mSurfacePosition, false /* canSkipFirstFrame */, new WindowAnimationSpec(anim, mSurfacePosition, false /* canSkipFirstFrame */,
getDisplayContent().getWindowCornerRadius()), 0 /* windowCornerRadius */),
mWmService.mSurfaceAnimationRunner); mWmService.mSurfaceAnimationRunner);
startAnimation(mPendingTransaction, adapter); startAnimation(mPendingTransaction, adapter);
commitPendingTransaction(); commitPendingTransaction();