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

Commit 2bc1b4ec authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Create input consumer only when nav bar is hidden by client"...

Merge "Merge "Create input consumer only when nav bar is hidden by client" into rvc-dev am: 0bd76726 am: 979e02c9 am: 988dfb9e" into rvc-qpr-dev-plus-aosp am: ee65df99

Change-Id: I7cfa8350f9a9ac5fcc5775024041ae9ec80b0723
parents f8490d04 ee65df99
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1494,9 +1494,7 @@ public class DisplayPolicy {
        final int behavior = mLastBehavior;
        boolean navVisible = ViewRootImpl.sNewInsetsMode != ViewRootImpl.NEW_INSETS_MODE_FULL
                ? (sysui & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0
                : mNavigationBar != null && mNavigationBar.getControllableInsetProvider() != null
                        && mNavigationBar.getControllableInsetProvider().isClientVisible()
                        && !mDisplayContent.getInsetsPolicy().isTransient(ITYPE_NAVIGATION_BAR);
                : isNavigationBarRequestedVisible();
        boolean navTranslucent = (sysui
                & (View.NAVIGATION_BAR_TRANSLUCENT | View.NAVIGATION_BAR_TRANSPARENT)) != 0;
        boolean immersive = (sysui & View.SYSTEM_UI_FLAG_IMMERSIVE) != 0
@@ -1533,6 +1531,14 @@ public class DisplayPolicy {
        mLastNotificationShadeForcesShowingNavigation = notificationShadeForcesShowingNavigation;
    }

    boolean isNavigationBarRequestedVisible() {
        final InsetsSourceProvider provider =
                mDisplayContent.getInsetsStateController().peekSourceProvider(ITYPE_NAVIGATION_BAR);
        return provider == null
                ? InsetsState.getDefaultVisibility(ITYPE_NAVIGATION_BAR)
                : provider.isClientVisible();
    }

    void updateHideNavInputEventReceiver(boolean navVisible, boolean navAllowedHidden) {
        // When the navigation bar isn't visible, we put up a fake input window to catch all
        // touch events. This way we can detect when the user presses anywhere to bring back the
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ class InsetsPolicy {
    }

    private void updateHideNavInputEventReceiver() {
        mPolicy.updateHideNavInputEventReceiver(!isHidden(ITYPE_NAVIGATION_BAR),
        mPolicy.updateHideNavInputEventReceiver(mPolicy.isNavigationBarRequestedVisible(),
                mFocusedWin != null
                        && mFocusedWin.mAttrs.insetsFlags.behavior != BEHAVIOR_SHOW_BARS_BY_TOUCH);
    }