From 71d72d13e66540291bab601cede4d143b59b1943 Mon Sep 17 00:00:00 2001 From: Ikram Gabiyev Date: Tue, 9 Jan 2024 15:10:56 -0800 Subject: Use color overlay for fixed rotation in btn nav Use color overlay instead of app icon overlay with fixed rotation on in button navigation mode. This is a temporary workaround to avoid app icon squashing due to animator issue in btn nav with non zero rotation. Before: http://recall/-/da2uuq57YtQRpR4N9NryZR/dFiyWX27i9rEPm3VTvj4Or After: http://recall/-/da2uuq57YtQRpR4N9NryZR/gUl5wasVU7z8B9JKQYpWRk Bug: 319286295 Test: manually enter PiP w/ fixed rotation in btn nav and srcRectHint=null Change-Id: Id7c8da71714bc34dd4a9b679c96b6b32d6bac6de --- .../Shell/src/com/android/wm/shell/pip/PipTransition.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java index 89dcc4c1d261..8e375a9ef5ee 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java @@ -987,10 +987,12 @@ public class PipTransition extends PipTransitionController { 0 /* startingAngle */, rotationDelta); if (sourceHintRect == null) { // We use content overlay when there is no source rect hint to enter PiP use bounds - // animation. + // animation. We also temporarily disallow app icon overlay and use color overlay + // instead when in fixed rotation enter PiP in button nav with no sourceRectHint. + // TODO(b/319286295): Fix App Icon Overlay animation in fixed rotation in btn nav. // TODO(b/272819817): cleanup the null-check and extra logging. final boolean hasTopActivityInfo = taskInfo.topActivityInfo != null; - if (hasTopActivityInfo) { + if (hasTopActivityInfo && mFixedRotationState != FIXED_ROTATION_TRANSITION) { animator.setAppIconContentOverlay( mContext, currentBounds, destinationBounds, taskInfo.topActivityInfo, mPipBoundsState.getLauncherState().getAppIconSizePx()); -- cgit v1.2.3-59-g8ed1b