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

Commit def8c8da authored by Jason Monk's avatar Jason Monk
Browse files

Refinement of auto-dimming nav

 - Make dimming only happen for interaction with nav
 - Extend time to dim
 - Shorten time to start dimming by same amount.

Test: visual
Change-Id: Ieb5b31bacdde9ce1952601ad65cff2d54386dd0f
Fixes: 65694001
parent 7a09f7ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ public class BarTransitions {
    public static final int MODE_LIGHTS_OUT_TRANSPARENT = 6;
    public static final int MODE_LIGHTS_OUT_TRANSPARENT = 6;


    public static final int LIGHTS_IN_DURATION = 250;
    public static final int LIGHTS_IN_DURATION = 250;
    public static final int LIGHTS_OUT_DURATION = 750;
    public static final int LIGHTS_OUT_DURATION = 1500;
    public static final int BACKGROUND_DURATION = 200;
    public static final int BACKGROUND_DURATION = 200;


    private final String mTag;
    private final String mTag;
+2 −3
Original line number Original line Diff line number Diff line
@@ -339,7 +339,7 @@ public class StatusBar extends SystemUI implements DemoMode,


    private static final int STATUS_OR_NAV_TRANSIENT =
    private static final int STATUS_OR_NAV_TRANSIENT =
            View.STATUS_BAR_TRANSIENT | View.NAVIGATION_BAR_TRANSIENT;
            View.STATUS_BAR_TRANSIENT | View.NAVIGATION_BAR_TRANSIENT;
    private static final long AUTOHIDE_TIMEOUT_MS = 3000;
    private static final long AUTOHIDE_TIMEOUT_MS = 2250;


    /** The minimum delay in ms between reports of notification visibility. */
    /** The minimum delay in ms between reports of notification visibility. */
    private static final int VISIBILITY_REPORT_MIN_DELAY_MS = 500;
    private static final int VISIBILITY_REPORT_MIN_DELAY_MS = 500;
@@ -3321,7 +3321,6 @@ public class StatusBar extends SystemUI implements DemoMode,
        } else {
        } else {
            cancelAutohide();
            cancelAutohide();
        }
        }
        touchAutoDim();
    }
    }


    protected int computeStatusBarMode(int oldVal, int newVal) {
    protected int computeStatusBarMode(int oldVal, int newVal) {
@@ -3404,10 +3403,10 @@ public class StatusBar extends SystemUI implements DemoMode,
        }
        }
        // manually dismiss the volume panel when interacting with the nav bar
        // manually dismiss the volume panel when interacting with the nav bar
        if (changing && interacting && barWindow == StatusBarManager.WINDOW_NAVIGATION_BAR) {
        if (changing && interacting && barWindow == StatusBarManager.WINDOW_NAVIGATION_BAR) {
            touchAutoDim();
            dismissVolumeDialog();
            dismissVolumeDialog();
        }
        }
        checkBarModes();
        checkBarModes();
        touchAutoDim();
    }
    }


    private void dismissVolumeDialog() {
    private void dismissVolumeDialog() {