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

Commit 9649d433 authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE: Only restore the positions of types which are controlled" into rvc-qpr-dev

parents a49ad6d5 a496e031
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -3437,17 +3437,16 @@ public class DisplayPolicy {
            }

            final InsetsState requestedState = controlTarget.getRequestedInsetsState();
            final InsetsSource nbSource = requestedState.peekSource(ITYPE_NAVIGATION_BAR);
            final InsetsSource sbSource = requestedState.peekSource(ITYPE_STATUS_BAR);
            final InsetsSource enbSource = requestedState.peekSource(ITYPE_EXTRA_NAVIGATION_BAR);
            final InsetsSource cbSource = requestedState.peekSource(ITYPE_CLIMATE_BAR);
            final @InsetsType int restorePositionTypes =
                    (requestedState.getSourceOrDefaultVisibility(ITYPE_NAVIGATION_BAR)
                    (nbSource != null && nbSource.isVisible() ? Type.navigationBars() : 0)
                    | (sbSource != null && sbSource.isVisible() ? Type.statusBars() : 0)
                    | (mExtraNavBarAlt != null && enbSource != null && enbSource.isVisible()
                            ? Type.navigationBars() : 0)
                    | (requestedState.getSourceOrDefaultVisibility(ITYPE_STATUS_BAR)
                            ? Type.statusBars() : 0)
                    | (mExtraNavBarAlt != null
                            && requestedState.getSourceOrDefaultVisibility(
                                    ITYPE_EXTRA_NAVIGATION_BAR)
                            ? Type.navigationBars() : 0)
                    | (mClimateBarAlt != null
                            && requestedState.getSourceOrDefaultVisibility(ITYPE_CLIMATE_BAR)
                    | (mClimateBarAlt != null && cbSource != null && cbSource.isVisible()
                            ? Type.statusBars() : 0);

            if (swipeTarget == mNavigationBar