OSDN Git Service

Refinement of auto-dimming nav
authorJason Monk <jmonk@google.com>
Mon, 18 Sep 2017 14:31:37 +0000 (10:31 -0400)
committerJason Monk <jmonk@google.com>
Mon, 18 Sep 2017 14:31:37 +0000 (10:31 -0400)
 - 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

packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java

index 1f44abe..4bca797 100644 (file)
@@ -50,7 +50,7 @@ public class BarTransitions {
     public static final int MODE_LIGHTS_OUT_TRANSPARENT = 6;
 
     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;
 
     private final String mTag;
index efc8d8b..200cada 100644 (file)
@@ -339,7 +339,7 @@ public class StatusBar extends SystemUI implements DemoMode,
 
     private static final int STATUS_OR_NAV_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. */
     private static final int VISIBILITY_REPORT_MIN_DELAY_MS = 500;
@@ -3321,7 +3321,6 @@ public class StatusBar extends SystemUI implements DemoMode,
         } else {
             cancelAutohide();
         }
-        touchAutoDim();
     }
 
     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
         if (changing && interacting && barWindow == StatusBarManager.WINDOW_NAVIGATION_BAR) {
+            touchAutoDim();
             dismissVolumeDialog();
         }
         checkBarModes();
-        touchAutoDim();
     }
 
     private void dismissVolumeDialog() {