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

Commit 007a5c71 authored by Graciela Putri's avatar Graciela Putri Committed by Android (Google) Code Review
Browse files

Merge changes from topic "bug-327210346" into 24D1-dev

* changes:
  Revert^2 Use resolved bounds in CompatDisplayInsets if letterboxed for aspect ratio
  Use legacy insets for compatibility behaviour
parents 091bf9f7 ad3b08cf
Loading
Loading
Loading
Loading
+92 −60
Original line number Diff line number Diff line
@@ -655,6 +655,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     */
    private CompatDisplayInsets mCompatDisplayInsets;

    private final TaskFragment.ConfigOverrideHint mResolveConfigHint;

    private static ConstrainDisplayApisConfig sConstrainDisplayApisConfig;

    boolean pendingVoiceInteractionStart;   // Waiting for activity-invoked voice session
@@ -816,6 +818,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    @Nullable
    private Rect mLetterboxBoundsForFixedOrientationAndAspectRatio;

    // Bounds populated in resolveAspectRatioRestriction when this activity is letterboxed for
    // aspect ratio. If not null, they are used as parent container in
    // resolveSizeCompatModeConfiguration and in a constructor of CompatDisplayInsets.
    @Nullable
    private Rect mLetterboxBoundsForAspectRatio;

    // Whether the activity is eligible to be letterboxed for fixed orientation with respect to its
    // requested orientation, even when it's letterbox for another reason (e.g., size compat mode)
    // and therefore #isLetterboxedForFixedOrientationAndAspectRatio returns false.
@@ -2110,6 +2118,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        mLetterboxUiController = new LetterboxUiController(mWmService, this);
        mCameraCompatControlEnabled = mWmService.mContext.getResources()
                .getBoolean(R.bool.config_isCameraCompatControlForStretchedIssuesEnabled);
        mResolveConfigHint = new TaskFragment.ConfigOverrideHint();
        mResolveConfigHint.mUseLegacyInsetsForStableBounds =
                mWmService.mFlags.mInsetsDecoupledConfiguration
                        && !info.isChangeEnabled(INSETS_DECOUPLED_CONFIGURATION_ENFORCED);

        mTargetSdk = info.applicationInfo.targetSdkVersion;

@@ -8405,10 +8417,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    fullConfig.windowConfiguration.getRotation());
        }

        final Rect letterboxedContainerBounds =
                mLetterboxBoundsForFixedOrientationAndAspectRatio != null
                        ? mLetterboxBoundsForFixedOrientationAndAspectRatio
                        : mLetterboxBoundsForAspectRatio;
        // The role of CompatDisplayInsets is like the override bounds.
        mCompatDisplayInsets =
                new CompatDisplayInsets(
                        mDisplayContent, this, mLetterboxBoundsForFixedOrientationAndAspectRatio);
                        mDisplayContent, this, letterboxedContainerBounds,
                        mResolveConfigHint.mUseLegacyInsetsForStableBounds);
    }

    private void clearSizeCompatModeAttributes() {
@@ -8480,6 +8497,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        mIsAspectRatioApplied = false;
        mIsEligibleForFixedOrientationLetterbox = false;
        mLetterboxBoundsForFixedOrientationAndAspectRatio = null;
        mLetterboxBoundsForAspectRatio = null;

        // Can't use resolvedConfig.windowConfiguration.getWindowingMode() because it can be
        // different from windowing mode of the task (PiP) during transition from fullscreen to PiP
@@ -8514,13 +8532,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            // If the activity has requested override bounds, the configuration needs to be
            // computed accordingly.
            if (!matchParentBounds()) {
                getTaskFragment().computeConfigResourceOverrides(resolvedConfig,
                        newParentConfiguration);
                computeConfigByResolveHint(resolvedConfig, newParentConfiguration);
            }
        // If activity in fullscreen mode is letterboxed because of fixed orientation then bounds
        // are already calculated in resolveFixedOrientationConfiguration.
        // are already calculated in resolveFixedOrientationConfiguration, or if in size compat
        // mode, it should already be calculated in resolveSizeCompatModeConfiguration.
        // Don't apply aspect ratio if app is overridden to fullscreen by device user/manufacturer.
        } else if (!isLetterboxedForFixedOrientationAndAspectRatio()
        }
        if (!isLetterboxedForFixedOrientationAndAspectRatio() && !mInSizeCompatModeForBounds
                && !mLetterboxUiController.hasFullscreenOverride()) {
            resolveAspectRatioRestriction(newParentConfiguration);
        }
@@ -8604,16 +8623,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (mDisplayContent == null) {
            return;
        }
        final Rect fullBounds = newParentConfiguration.windowConfiguration.getAppBounds();
        final Rect parentAppBounds = newParentConfiguration.windowConfiguration.getAppBounds();
        int rotation = newParentConfiguration.windowConfiguration.getRotation();
        if (rotation == ROTATION_UNDEFINED && !isFixedRotationTransforming()) {
            rotation = mDisplayContent.getRotation();
        }
        if (!mWmService.mFlags.mInsetsDecoupledConfiguration
                || info.isChangeEnabled(INSETS_DECOUPLED_CONFIGURATION_ENFORCED)
        if (!mResolveConfigHint.mUseLegacyInsetsForStableBounds
                || getCompatDisplayInsets() != null
                || isFloating(parentWindowingMode) || fullBounds == null
                || fullBounds.isEmpty() || rotation == ROTATION_UNDEFINED) {
                || isFloating(parentWindowingMode) || parentAppBounds == null
                || parentAppBounds.isEmpty() || 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.
@@ -8621,15 +8639,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }

        // Override starts here.
        final Rect stableInsets = mDisplayContent.getDisplayPolicy().getDecorInsetsInfo(
                rotation, fullBounds.width(), fullBounds.height()).mOverrideConfigInsets;
        final boolean rotated = (rotation == ROTATION_90 || rotation == ROTATION_270);
        final int dw = rotated ? mDisplayContent.mBaseDisplayHeight
                : mDisplayContent.mBaseDisplayWidth;
        final int dh = rotated ? mDisplayContent.mBaseDisplayWidth
                : mDisplayContent.mBaseDisplayHeight;
        final  Rect nonDecorInsets = mDisplayContent.getDisplayPolicy()
                .getDecorInsetsInfo(rotation, dw, dh).mOverrideNonDecorInsets;
        // This should be the only place override the configuration for ActivityRecord. Override
        // the value if not calculated yet.
        Rect outAppBounds = inOutConfig.windowConfiguration.getAppBounds();
        if (outAppBounds == null || outAppBounds.isEmpty()) {
            inOutConfig.windowConfiguration.setAppBounds(fullBounds);
            inOutConfig.windowConfiguration.setAppBounds(parentAppBounds);
            outAppBounds = inOutConfig.windowConfiguration.getAppBounds();
            outAppBounds.inset(stableInsets);
            outAppBounds.inset(nonDecorInsets);
        }
        float density = inOutConfig.densityDpi;
        if (density == Configuration.DENSITY_DPI_UNDEFINED) {
@@ -8653,11 +8676,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            // For the case of PIP transition and multi-window environment, the
            // smallestScreenWidthDp is handled already. Override only if the app is in
            // fullscreen.
            final boolean rotated = (rotation == ROTATION_90 || rotation == ROTATION_270);
            DisplayInfo info = new DisplayInfo();
            mDisplayContent.getDisplay().getDisplayInfo(info);
            mDisplayContent.computeSizeRanges(info, rotated, info.logicalWidth,
                    info.logicalHeight, mDisplayContent.getDisplayMetrics().density,
            mDisplayContent.computeSizeRanges(info, rotated, dw, dh,
                    mDisplayContent.getDisplayMetrics().density,
                    inOutConfig, true /* overrideConfig */);
        }

@@ -8670,14 +8692,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }
    }

    /**
     * @return The orientation to use to understand if reachability is enabled.
     */
    @Configuration.Orientation
    int getOrientationForReachability() {
        return mLetterboxUiController.hasInheritedLetterboxBehavior()
                ? mLetterboxUiController.getInheritedOrientation()
                : getRequestedConfigurationOrientation();
    private void computeConfigByResolveHint(@NonNull Configuration resolvedConfig,
            @NonNull Configuration parentConfig) {
        task.computeConfigResourceOverrides(resolvedConfig, parentConfig, mResolveConfigHint);
        // Reset the temp info which should only take effect for the specified computation.
        mResolveConfigHint.mTmpCompatInsets = null;
        mResolveConfigHint.mTmpOverrideDisplayInfo = null;
    }

    /**
@@ -8820,7 +8840,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }

        // Since bounds has changed, the configuration needs to be computed accordingly.
        getTaskFragment().computeConfigResourceOverrides(resolvedConfig, newParentConfiguration);
        computeConfigByResolveHint(resolvedConfig, newParentConfiguration);

        // The position of configuration bounds were calculated in screen space because that is
        // easier to resolve the relative position in parent container. However, if the activity is
@@ -8914,17 +8934,18 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     *                     to compute the stable bounds.
     * @param outStableBounds will store the stable bounds, which are the bounds with insets
     *                        applied, if orientation is not respected when insets are applied.
     *                        Otherwise outStableBounds will be empty. Stable bounds should be used
     *                        to compute letterboxed bounds if orientation is not respected when
     *                        insets are applied.
     *                        Stable bounds should be used to compute letterboxed bounds if
     *                        orientation is not respected when insets are applied.
     * @param outNonDecorBounds will store the non decor bounds, which are the bounds with non
     *                          decor insets applied, like display cutout and nav bar.
     */
    private boolean orientationRespectedWithInsets(Rect parentBounds, Rect outStableBounds) {
    private boolean orientationRespectedWithInsets(Rect parentBounds, Rect outStableBounds,
            Rect outNonDecorBounds) {
        outStableBounds.setEmpty();
        if (mDisplayContent == null) {
            return true;
        }
        if (mWmService.mFlags.mInsetsDecoupledConfiguration
                && info.isChangeEnabled(INSETS_DECOUPLED_CONFIGURATION_ENFORCED)) {
        if (!mResolveConfigHint.mUseLegacyInsetsForStableBounds) {
            // No insets should be considered any more.
            return true;
        }
@@ -8941,8 +8962,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                ? getFixedRotationTransformDisplayInfo()
                : mDisplayContent.getDisplayInfo();
        final Task task = getTask();
        task.calculateInsetFrames(mTmpBounds /* outNonDecorBounds */,
                outStableBounds /* outStableBounds */, parentBounds /* bounds */, di);
        task.calculateInsetFrames(outNonDecorBounds /* outNonDecorBounds */,
                outStableBounds /* outStableBounds */, parentBounds /* bounds */, di,
                mResolveConfigHint.mUseLegacyInsetsForStableBounds);
        final int orientationWithInsets = outStableBounds.height() >= outStableBounds.width()
                ? ORIENTATION_PORTRAIT : ORIENTATION_LANDSCAPE;
        // If orientation does not match the orientation with insets applied, then a
@@ -8952,9 +8974,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // have the desired orientation.
        final boolean orientationRespectedWithInsets = orientation == orientationWithInsets
                || orientationWithInsets == requestedOrientation;
        if (orientationRespectedWithInsets) {
            outStableBounds.setEmpty();
        }
        return orientationRespectedWithInsets;
    }

@@ -8980,9 +8999,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    private void resolveFixedOrientationConfiguration(@NonNull Configuration newParentConfig) {
        final Rect parentBounds = newParentConfig.windowConfiguration.getBounds();
        final Rect stableBounds = new Rect();
        final Rect outNonDecorBounds = mTmpBounds;
        // If orientation is respected when insets are applied, then stableBounds will be empty.
        boolean orientationRespectedWithInsets =
                orientationRespectedWithInsets(parentBounds, stableBounds);
                orientationRespectedWithInsets(parentBounds, stableBounds, outNonDecorBounds);
        if (orientationRespectedWithInsets && handlesOrientationChangeFromDescendant(
                getOverrideOrientation())) {
            // No need to letterbox because of fixed orientation. Display will handle
@@ -8999,7 +9019,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

        final Rect resolvedBounds =
                getResolvedOverrideConfiguration().windowConfiguration.getBounds();
        final int parentOrientation = newParentConfig.orientation;
        final int stableBoundsOrientation = stableBounds.width() > stableBounds.height()
                ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
        final int parentOrientation = mResolveConfigHint.mUseLegacyInsetsForStableBounds
                ? stableBoundsOrientation : newParentConfig.orientation;

        // If the activity requires a different orientation (either by override or activityInfo),
        // make it fit the available bounds by scaling down its bounds.
@@ -9014,7 +9037,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }
        final CompatDisplayInsets compatDisplayInsets = getCompatDisplayInsets();

        if (compatDisplayInsets != null && !compatDisplayInsets.mIsInFixedOrientationLetterbox) {
        if (compatDisplayInsets != null
                && !compatDisplayInsets.mIsInFixedOrientationOrAspectRatioLetterbox) {
            // App prefers to keep its original size.
            // If the size compat is from previous fixed orientation letterboxing, we may want to
            // have fixed orientation letterbox again, otherwise it will show the size compat
@@ -9022,10 +9046,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            return;
        }

        final Rect parentAppBounds = mResolveConfigHint.mUseLegacyInsetsForStableBounds
                ? outNonDecorBounds : newParentConfig.windowConfiguration.getAppBounds();
        // TODO(b/182268157): Explore using only one type of parentBoundsWithInsets, either app
        // bounds or stable bounds to unify aspect ratio logic.
        final Rect parentBoundsWithInsets = orientationRespectedWithInsets
                ? newParentConfig.windowConfiguration.getAppBounds() : stableBounds;
                ? parentAppBounds : stableBounds;
        final Rect containingBounds = new Rect();
        final Rect containingBoundsWithInsets = new Rect();
        // Need to shrink the containing bounds into a square because the parent orientation
@@ -9102,8 +9128,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

        // Calculate app bounds using fixed orientation bounds because they will be needed later
        // for comparison with size compat app bounds in {@link resolveSizeCompatModeConfiguration}.
        getTaskFragment().computeConfigResourceOverrides(getResolvedOverrideConfiguration(),
                newParentConfig, compatDisplayInsets);
        mResolveConfigHint.mTmpCompatInsets = compatDisplayInsets;
        computeConfigByResolveHint(getResolvedOverrideConfiguration(), newParentConfig);
        mLetterboxBoundsForFixedOrientationAndAspectRatio = new Rect(resolvedBounds);
    }

@@ -9144,8 +9170,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (!resolvedBounds.isEmpty() && !resolvedBounds.equals(parentBounds)) {
            // Compute the configuration based on the resolved bounds. If aspect ratio doesn't
            // restrict, the bounds should be the requested override bounds.
            getTaskFragment().computeConfigResourceOverrides(resolvedConfig, newParentConfiguration,
                    getFixedRotationTransformDisplayInfo());
            mResolveConfigHint.mTmpOverrideDisplayInfo = getFixedRotationTransformDisplayInfo();
            computeConfigByResolveHint(resolvedConfig, newParentConfiguration);
            mLetterboxBoundsForAspectRatio = new Rect(resolvedBounds);
        }
    }

@@ -9209,8 +9236,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // Use resolvedBounds to compute other override configurations such as appBounds. The bounds
        // are calculated in compat container space. The actual position on screen will be applied
        // later, so the calculation is simpler that doesn't need to involve offset from parent.
        getTaskFragment().computeConfigResourceOverrides(resolvedConfig, newParentConfiguration,
                compatDisplayInsets);
        mResolveConfigHint.mTmpCompatInsets = compatDisplayInsets;
        computeConfigByResolveHint(resolvedConfig, newParentConfiguration);
        // Use current screen layout as source because the size of app is independent to parent.
        resolvedConfig.screenLayout = computeScreenLayout(
                getConfiguration().screenLayout, resolvedConfig.screenWidthDp,
@@ -10714,10 +10741,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        /** Whether the {@link Task} windowingMode represents a floating window*/
        final boolean mIsFloating;
        /**
         * Whether is letterboxed because of fixed orientation when the unresizable activity is
         * first shown.
         * Whether is letterboxed because of fixed orientation or aspect ratio when
         * the unresizable activity is first shown.
         */
        final boolean mIsInFixedOrientationLetterbox;
        final boolean mIsInFixedOrientationOrAspectRatioLetterbox;
        /**
         * The nonDecorInsets for each rotation. Includes the navigation bar and cutout insets. It
         * is used to compute the appBounds.
@@ -10732,7 +10759,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

        /** Constructs the environment to simulate the bounds behavior of the given container. */
        CompatDisplayInsets(DisplayContent display, ActivityRecord container,
                @Nullable Rect fixedOrientationBounds) {
                @Nullable Rect letterboxedContainerBounds, boolean useOverrideInsets) {
            mOriginalRotation = display.getRotation();
            mIsFloating = container.getWindowConfiguration().tasksAreFloating();
            mOriginalRequestedOrientation = container.getRequestedConfigurationOrientation();
@@ -10747,22 +10774,22 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    mNonDecorInsets[rotation] = emptyRect;
                    mStableInsets[rotation] = emptyRect;
                }
                mIsInFixedOrientationLetterbox = false;
                mIsInFixedOrientationOrAspectRatioLetterbox = false;
                return;
            }

            final Task task = container.getTask();

            mIsInFixedOrientationLetterbox = fixedOrientationBounds != null;
            mIsInFixedOrientationOrAspectRatioLetterbox = letterboxedContainerBounds != null;

            // Store the bounds of the Task for the non-resizable activity to use in size compat
            // mode so that the activity will not be resized regardless the windowing mode it is
            // currently in.
            // When an activity needs to be letterboxed because of fixed orientation, use fixed
            // orientation bounds instead of task bounds since the activity will be displayed
            // within these even if it is in size compat mode.
            final Rect filledContainerBounds = mIsInFixedOrientationLetterbox
                    ? fixedOrientationBounds
            // When an activity needs to be letterboxed because of fixed orientation or aspect
            // ratio, use resolved bounds instead of task bounds since the activity will be
            // displayed within these even if it is in size compat mode.
            final Rect filledContainerBounds = mIsInFixedOrientationOrAspectRatioLetterbox
                    ? letterboxedContainerBounds
                    : task != null ? task.getBounds() : display.getBounds();
            final int filledContainerRotation = task != null
                    ? task.getConfiguration().windowConfiguration.getRotation()
@@ -10784,8 +10811,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                final int dh = rotated ? display.mBaseDisplayWidth : display.mBaseDisplayHeight;
                final DisplayPolicy.DecorInsets.Info decorInfo =
                        policy.getDecorInsetsInfo(rotation, dw, dh);
                mNonDecorInsets[rotation].set(decorInfo.mNonDecorInsets);
                if (useOverrideInsets) {
                    mStableInsets[rotation].set(decorInfo.mOverrideConfigInsets);
                    mNonDecorInsets[rotation].set(decorInfo.mOverrideNonDecorInsets);
                } else {
                    mStableInsets[rotation].set(decorInfo.mConfigInsets);
                    mNonDecorInsets[rotation].set(decorInfo.mNonDecorInsets);
                }

                if (unfilledContainerBounds == null) {
                    continue;
+21 −0
Original line number Diff line number Diff line
@@ -1923,6 +1923,11 @@ public class DisplayPolicy {
             */
            final Rect mOverrideConfigInsets = new Rect();

            /**
             * Override value of mNonDecorInsets for app compatibility purpose.
             */
            final Rect mOverrideNonDecorInsets = new Rect();

            /** The display frame available after excluding {@link #mNonDecorInsets}. */
            final Rect mNonDecorFrame = new Rect();

@@ -1938,6 +1943,11 @@ public class DisplayPolicy {
             */
            final Rect mOverrideConfigFrame = new Rect();

            /**
             * Override value of mNonDecorFrame for app compatibility purpose.
             */
            final Rect mOverrideNonDecorFrame = new Rect();

            private boolean mNeedUpdate = true;

            InsetsState update(DisplayContent dc, int rotation, int w, int h) {
@@ -1957,17 +1967,26 @@ public class DisplayPolicy {
                        ? configInsets
                        : insetsState.calculateInsets(displayFrame,
                                dc.mWmService.mOverrideConfigTypes, true /* ignoreVisibility */);
                final Insets overrideDecorInsets = dc.mWmService.mDecorTypes
                        == dc.mWmService.mOverrideDecorTypes
                        ? decor
                        : insetsState.calculateInsets(displayFrame,
                                dc.mWmService.mOverrideDecorTypes, true /* ignoreVisibility */);
                mNonDecorInsets.set(decor.left, decor.top, decor.right, decor.bottom);
                mConfigInsets.set(configInsets.left, configInsets.top, configInsets.right,
                        configInsets.bottom);
                mOverrideConfigInsets.set(overrideConfigInsets.left, overrideConfigInsets.top,
                        overrideConfigInsets.right, overrideConfigInsets.bottom);
                mOverrideNonDecorInsets.set(overrideDecorInsets.left, overrideDecorInsets.top,
                        overrideDecorInsets.right, overrideDecorInsets.bottom);
                mNonDecorFrame.set(displayFrame);
                mNonDecorFrame.inset(mNonDecorInsets);
                mConfigFrame.set(displayFrame);
                mConfigFrame.inset(mConfigInsets);
                mOverrideConfigFrame.set(displayFrame);
                mOverrideConfigFrame.inset(mOverrideConfigInsets);
                mOverrideNonDecorFrame.set(displayFrame);
                mOverrideNonDecorFrame.inset(mOverrideNonDecorInsets);
                mNeedUpdate = false;
                return insetsState;
            }
@@ -1976,9 +1995,11 @@ public class DisplayPolicy {
                mNonDecorInsets.set(other.mNonDecorInsets);
                mConfigInsets.set(other.mConfigInsets);
                mOverrideConfigInsets.set(other.mOverrideConfigInsets);
                mOverrideNonDecorInsets.set(other.mOverrideNonDecorInsets);
                mNonDecorFrame.set(other.mNonDecorFrame);
                mConfigFrame.set(other.mConfigFrame);
                mOverrideConfigFrame.set(other.mOverrideConfigFrame);
                mOverrideNonDecorFrame.set(other.mOverrideNonDecorFrame);
                mNeedUpdate = false;
            }

+37 −31

File changed.

Preview size limit exceeded, changes collapsed.

+5 −0
Original line number Diff line number Diff line
@@ -563,6 +563,8 @@ public class WindowManagerService extends IWindowManager.Stub

    final int mOverrideConfigTypes;

    final int mOverrideDecorTypes;

    final boolean mLimitedAlphaCompositing;
    final int mMaxUiWidth;

@@ -1203,10 +1205,13 @@ public class WindowManagerService extends IWindowManager.Stub
        if (isScreenSizeDecoupledFromStatusBarAndCutout && !mFlags.mInsetsDecoupledConfiguration) {
            // If the global new behavior is not there, but the partial decouple flag is on.
            mOverrideConfigTypes = 0;
            mOverrideDecorTypes = 0;
        } else {
            mOverrideConfigTypes =
                    WindowInsets.Type.displayCutout() | WindowInsets.Type.statusBars()
                            | WindowInsets.Type.navigationBars();
            mOverrideDecorTypes = WindowInsets.Type.displayCutout()
                    | WindowInsets.Type.navigationBars();
        }

        mLetterboxConfiguration = new LetterboxConfiguration(
+53 −12

File changed.

Preview size limit exceeded, changes collapsed.

Loading