Non-default displays usually don't have rounded-corners. It doesn't
make sense to apply rounded-corner animations on them. Besides, we
don't know if an external display has rounded-corners or not.
Bug:
131040127
Test: Follow the reproduction steps in the bug.
Change-Id: I0b892bfb50875eaa59b2bf5ba07074bb3494042b
mSurfaceAnimator.startAnimation(t, new LocalAnimationAdapter(
new WindowAnimationSpec(anim, position,
mAppToken.getDisplayContent().mAppTransition.canSkipFirstFrame(),
- mAppToken.mWmService.mWindowCornerRadius),
+ mAppToken.getWindowCornerRadiusForAnimation()),
mAppToken.mWmService.mSurfaceAnimationRunner), false /* hidden */);
}
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.content.pm.ActivityInfo.COLOR_MODE_DEFAULT;
-import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION;
-import static android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
getDisplayContent().mAppTransition.canSkipFirstFrame(),
appStackClipMode,
true /* isAppAnimation */,
- mWmService.mWindowCornerRadius),
+ getWindowCornerRadiusForAnimation()),
mWmService.mSurfaceAnimationRunner);
if (a.getZAdjustment() == Animation.ZORDER_TOP) {
mNeedsZBoost = true;
anim.scaleCurrentDuration(mWmService.getWindowAnimationScaleLocked());
final AnimationAdapter adapter = new LocalAnimationAdapter(
new WindowAnimationSpec(anim, mSurfacePosition, false /* canSkipFirstFrame */,
- mWmService.mWindowCornerRadius),
+ mToken.getWindowCornerRadiusForAnimation()),
mWmService.mSurfaceAnimationRunner);
startAnimation(mPendingTransaction, adapter);
commitPendingTransaction();
mOwnerCanManageAppTokens);
return mOwnerCanManageAppTokens && (layer > navLayer);
}
+
+ float getWindowCornerRadiusForAnimation() {
+ return mDisplayContent.isDefaultDisplay ? mWmService.mWindowCornerRadius : 0;
+ }
}