Merge "Do not letterbox the activity in PiP mode" into udc-dev am: 41667fa9da

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23503609

Change-Id: I33d4bcfb05918873bb07fced54dcf847502966e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongwei Wang
2023-06-01 10:35:53 +00:00
committed by Automerger Merge Worker

View File

@@ -3883,13 +3883,15 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
} }
/** /**
* @return true if activity bounds are letterboxed or letterboxed for diplay cutout. * @return {@code true} if activity bounds are letterboxed or letterboxed for display cutout.
* Note that it's always {@code false} if the activity is in pip mode.
* *
* <p>Note that letterbox UI may not be shown even when this returns {@code true}. See {@link * <p>Note that letterbox UI may not be shown even when this returns {@code true}. See {@link
* LetterboxUiController#shouldShowLetterboxUi} for more context. * LetterboxUiController#shouldShowLetterboxUi} for more context.
*/ */
boolean areAppWindowBoundsLetterboxed() { boolean areAppWindowBoundsLetterboxed() {
return mActivityRecord != null return mActivityRecord != null
&& !mActivityRecord.inPinnedWindowingMode()
&& (mActivityRecord.areBoundsLetterboxed() || isLetterboxedForDisplayCutout()); && (mActivityRecord.areBoundsLetterboxed() || isLetterboxedForDisplayCutout());
} }