diff options
author | jrizzoli <joey@cyanogenmoditalia.it> | 2015-10-28 18:43:00 +0100 |
---|---|---|
committer | jrizzoli <joey@cyanogenmoditalia.it> | 2015-11-05 14:39:03 +0100 |
commit | be2afc54787f656e2748d3f42bb98dde1e77f5a0 (patch) | |
tree | 3a429017ecb1c43bbc1e8597df14f3be0b7155bf /src/com/android | |
parent | 947cf165f545e1cdf7cee6b22bfa168b11f76c0c (diff) | |
download | android_packages_apps_Gello-be2afc54787f656e2748d3f42bb98dde1e77f5a0.tar.gz android_packages_apps_Gello-be2afc54787f656e2748d3f42bb98dde1e77f5a0.tar.bz2 android_packages_apps_Gello-be2afc54787f656e2748d3f42bb98dde1e77f5a0.zip |
gello: support disabling colored statubar
Change-Id: I9e7ab50c87d7a4fd86250f84224f7323b49724f7
Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it>
Conflicts:
res/values/strings.xml
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 8 | ||||
-rw-r--r-- | src/com/android/browser/NavigationBarBase.java | 3 | ||||
-rw-r--r-- | src/com/android/browser/PreferenceKeys.java | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index fce0c100..bc1b83e4 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -902,6 +902,14 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, mPrefs.edit().putBoolean(PREF_AUTOFILL_ENABLED, value).apply(); } + public boolean isColoredSBEnabled() { + return mPrefs.getBoolean(PREF_COLOREDSB_ENABLED, false); + } + + public void setColoredSBEnabled(boolean value) { + mPrefs.edit().putBoolean(PREF_COLOREDSB_ENABLED, value).apply(); + } + public boolean isPowerSaveModeEnabled() { return mPrefs.getBoolean(PREF_POWERSAVE_ENABLED, false); } diff --git a/src/com/android/browser/NavigationBarBase.java b/src/com/android/browser/NavigationBarBase.java index 690b0079..dfdc3bf0 100644 --- a/src/com/android/browser/NavigationBarBase.java +++ b/src/com/android/browser/NavigationBarBase.java @@ -203,6 +203,9 @@ public class NavigationBarBase extends LinearLayout implements // The flag that allows coloring is disabled in PowerSaveMode, no point in trying to color. if (BrowserSettings.getInstance().isPowerSaveModeEnabled()) return; + // Disable colored statusbar if user asked so + if (! BrowserSettings.getInstance().isColoredSBEnabled()) + return; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { int currentColor = activity.getWindow().getStatusBarColor(); Integer from = currentColor; diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java index ce6c4cb6..135ecb30 100644 --- a/src/com/android/browser/PreferenceKeys.java +++ b/src/com/android/browser/PreferenceKeys.java @@ -62,6 +62,7 @@ public interface PreferenceKeys { static final String PREF_AUTOFILL_PROFILE = "autofill_profile"; static final String PREF_HOMEPAGE = "homepage"; static final String PREF_POWERSAVE_ENABLED = "powersave_enabled"; + static final String PREF_COLOREDSB_ENABLED = "coloredsb_enabled"; static final String PREF_NIGHTMODE_ENABLED = "nightmode_enabled"; static final String PREF_SYNC_WITH_CHROME = "sync_with_chrome"; |