Disable rounded corners when in multi window

We should not draw rounded corners when animating windows into split
view. The divider is a single horizontal line, and we don't support
multiple radii per window.

Fixes: 129540518
Test: visual
Change-Id: Ic31395c77f376053a136a9c55382b74b4157ee34
Merged-In: Ic31395c77f376053a136a9c55382b74b4157ee34
This commit is contained in:
Lucas Dupin
2019-04-29 17:55:38 -07:00
parent 50e31711af
commit 95acf43c9d
2 changed files with 7 additions and 2 deletions

View File

@@ -2553,12 +2553,17 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
final Animation a = loadAnimation(lp, transit, enter, isVoiceInteraction);
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(
new WindowAnimationSpec(a, mTmpPoint, mTmpRect,
getDisplayContent().mAppTransition.canSkipFirstFrame(),
appStackClipMode,
true /* isAppAnimation */,
getDisplayContent().getWindowCornerRadius()),
windowCornerRadius),
mWmService.mSurfaceAnimationRunner);
if (a.getZAdjustment() == Animation.ZORDER_TOP) {
mNeedsZBoost = true;

View File

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