diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityRecord.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 3422e216af77..b642ae875df4 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -8652,7 +8652,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } if (!mResolveConfigHint.mUseOverrideInsetsForStableBounds || getCompatDisplayInsets() != null || shouldCreateCompatDisplayInsets() - || isFloating(parentWindowingMode) || rotation == ROTATION_UNDEFINED) { + || (isFloating(parentWindowingMode) + // Check the windowing mode of activity as well in case it is switching + // between PiP and fullscreen. + && isFloating(inOutConfig.windowConfiguration.getWindowingMode())) + || rotation == ROTATION_UNDEFINED) { // If the insets configuration decoupled logic is not enabled for the app, or the app // already has a compat override, or the context doesn't contain enough info to // calculate the override, skip the override. |