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

Commit f9284cf0 authored by Pat Manning's avatar Pat Manning Committed by Automerger Merge Worker
Browse files

Merge "Refactor force visible nav bar into new secure setting." into tm-dev am: 28118273

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17002946

Change-Id: Ib720cf678ccf74941a72ebc03e1a13dcf19e6912
parents 54363675 28118273
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {

    private final boolean mIsSafeModeEnabled;
    private final boolean mIsUserSetupComplete;
    private final boolean mIsNavBarForceVisible;
    private final boolean mIsNavBarKidsMode;
    private boolean mIsDestroyed = false;
    // The flag to know if the window is excluded from magnification region computation.
@@ -134,6 +135,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                () -> getPackageManager().isSafeMode());
        mIsUserSetupComplete = SettingsCache.INSTANCE.get(this).getValue(
                Settings.Secure.getUriFor(Settings.Secure.USER_SETUP_COMPLETE), 0);
        mIsNavBarForceVisible = SettingsCache.INSTANCE.get(this).getValue(
                Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_FORCE_VISIBLE), 0);
        mIsNavBarKidsMode = SettingsCache.INSTANCE.get(this).getValue(
                Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), 0);

@@ -694,6 +697,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
        return mIsNavBarKidsMode && isThreeButtonNav();
    }

    protected boolean isNavBarForceVisible() {
        return mIsNavBarForceVisible;
    }

    /**
     * Called when we determine the touchable region.
     *
+2 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class TaskbarForceVisibleImmersiveController implements TouchController {
    /** Update values tracked via sysui flags. */
    public void updateSysuiFlags(int sysuiFlags) {
        mIsImmersiveMode = (sysuiFlags & SYSUI_STATE_IMMERSIVE_MODE) != 0;
        if (mContext.isNavBarKidsModeActive()) {
        if (mContext.isNavBarForceVisible()) {
            if (mIsImmersiveMode) {
                startIconDimming();
            } else {
@@ -113,7 +113,7 @@ public class TaskbarForceVisibleImmersiveController implements TouchController {
     * Returns whether the taskbar is always visible in immersive mode.
     */
    private boolean isNavbarShownInImmersiveMode() {
        return mIsImmersiveMode && mContext.isNavBarKidsModeActive();
        return mIsImmersiveMode && mContext.isNavBarForceVisible();
    }

    private void updateIconDimmingAlpha() {