Loading packages/SystemUI/res/values/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ <bool name="config_dead_zone_flash">false</bool> <!-- Whether to enable dimming navigation buttons when wallpaper is not visible, should be enabled for OLED devices to reduce/prevent burn in on the navigation bar (because of the black background and static button placements) and disabled for all other devices to prevent wasting cpu cycles on the dimming animation --> <bool name="config_navigation_bar_enable_auto_dim_no_visible_wallpaper">true</bool> <!-- Whether QuickSettings is in a phone landscape --> <bool name="quick_settings_wide">false</bool> Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java +5 −3 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.view.IWallpaperVisibilityListener; import android.view.IWindowManager; import android.view.MotionEvent; import android.view.View; import android.view.WindowManagerGlobal; import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.Dependency; Loading @@ -37,6 +36,7 @@ public final class NavigationBarTransitions extends BarTransitions { private final NavigationBarView mView; private final IStatusBarService mBarService; private final LightBarTransitionsController mLightTransitionsController; private final boolean mAllowAutoDimWallpaperNotVisible; private boolean mWallpaperVisible; private boolean mLightsOut; Loading @@ -49,6 +49,8 @@ public final class NavigationBarTransitions extends BarTransitions { ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mLightTransitionsController = new LightBarTransitionsController(view.getContext(), this::applyDarkIntensity); mAllowAutoDimWallpaperNotVisible = view.getContext().getResources() .getBoolean(R.bool.config_navigation_bar_enable_auto_dim_no_visible_wallpaper); IWindowManager windowManagerService = Dependency.get(IWindowManager.class); Handler handler = Handler.getMain(); Loading Loading @@ -80,8 +82,8 @@ public final class NavigationBarTransitions extends BarTransitions { @Override protected boolean isLightsOut(int mode) { return super.isLightsOut(mode) || (mAutoDim && !mWallpaperVisible && mode != MODE_WARNING); return super.isLightsOut(mode) || (mAllowAutoDimWallpaperNotVisible && mAutoDim && !mWallpaperVisible && mode != MODE_WARNING); } public LightBarTransitionsController getLightTransitionsController() { Loading Loading
packages/SystemUI/res/values/config.xml +6 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ <bool name="config_dead_zone_flash">false</bool> <!-- Whether to enable dimming navigation buttons when wallpaper is not visible, should be enabled for OLED devices to reduce/prevent burn in on the navigation bar (because of the black background and static button placements) and disabled for all other devices to prevent wasting cpu cycles on the dimming animation --> <bool name="config_navigation_bar_enable_auto_dim_no_visible_wallpaper">true</bool> <!-- Whether QuickSettings is in a phone landscape --> <bool name="quick_settings_wide">false</bool> Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java +5 −3 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.view.IWallpaperVisibilityListener; import android.view.IWindowManager; import android.view.MotionEvent; import android.view.View; import android.view.WindowManagerGlobal; import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.Dependency; Loading @@ -37,6 +36,7 @@ public final class NavigationBarTransitions extends BarTransitions { private final NavigationBarView mView; private final IStatusBarService mBarService; private final LightBarTransitionsController mLightTransitionsController; private final boolean mAllowAutoDimWallpaperNotVisible; private boolean mWallpaperVisible; private boolean mLightsOut; Loading @@ -49,6 +49,8 @@ public final class NavigationBarTransitions extends BarTransitions { ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mLightTransitionsController = new LightBarTransitionsController(view.getContext(), this::applyDarkIntensity); mAllowAutoDimWallpaperNotVisible = view.getContext().getResources() .getBoolean(R.bool.config_navigation_bar_enable_auto_dim_no_visible_wallpaper); IWindowManager windowManagerService = Dependency.get(IWindowManager.class); Handler handler = Handler.getMain(); Loading Loading @@ -80,8 +82,8 @@ public final class NavigationBarTransitions extends BarTransitions { @Override protected boolean isLightsOut(int mode) { return super.isLightsOut(mode) || (mAutoDim && !mWallpaperVisible && mode != MODE_WARNING); return super.isLightsOut(mode) || (mAllowAutoDimWallpaperNotVisible && mAutoDim && !mWallpaperVisible && mode != MODE_WARNING); } public LightBarTransitionsController getLightTransitionsController() { Loading