summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserSettings.java8
-rw-r--r--src/com/android/browser/NavigationBarBase.java3
-rw-r--r--src/com/android/browser/PreferenceKeys.java1
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";