Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit caa58387 authored by wilsonshih's avatar wilsonshih
Browse files

Ignore letterbox insets for back animation target.

All animation will play the animation target with it's letterbox, so
there can ignore that insets, in case of shell being confused when
handling taskbar insets.

Bug: 328707998
Test: launch app with a bottom letterbox, verify letterbox area won't
be clip when back-to-home.

Change-Id: I195f437c04cc5dd2abe19c7f4f888dd3888296e2
parent cd85aff3
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ import android.window.TaskSnapshot;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.policy.TransitionAnimation;
import com.android.internal.protolog.common.ProtoLog;
import com.android.server.wm.utils.InsetUtils;
import com.android.window.flags.Flags;

import java.io.PrintWriter;
@@ -1436,15 +1435,11 @@ class BackNavigationController {
                    return null;
                }
                final WindowState mainWindow = r.findMainWindow();
                Rect insets;
                if (mainWindow != null) {
                    insets = mainWindow.getInsetsStateWithVisibilityOverride().calculateInsets(
                final Rect insets = mainWindow != null
                        ? mainWindow.getInsetsStateWithVisibilityOverride().calculateInsets(
                                mBounds, WindowInsets.Type.tappableElement(),
                            false /* ignoreVisibility */).toRect();
                    InsetUtils.addInsets(insets, mainWindow.mActivityRecord.getLetterboxInsets());
                } else {
                    insets = new Rect();
                }
                                false /* ignoreVisibility */).toRect()
                        : new Rect();
                final int mode = mIsOpen ? MODE_OPENING : MODE_CLOSING;
                mAnimationTarget = new RemoteAnimationTarget(t.mTaskId, mode, mCapturedLeash,
                        !r.fillsParent(), new Rect(),