summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserSettings.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-01-24 14:57:18 -0800
committerJohn Reck <jreck@google.com>2011-01-24 15:01:36 -0800
commit3db2e0733855aefa098ed55b1e5f81539e12e19c (patch)
tree5c7966d9a778c29055ff1ea65e1b3dc57fcc6f02 /src/com/android/browser/BrowserSettings.java
parentb02aea16b9b12d39f1b34f1a94ad5564a25e2565 (diff)
downloadpackages_apps_Browser-3db2e0733855aefa098ed55b1e5f81539e12e19c.zip
packages_apps_Browser-3db2e0733855aefa098ed55b1e5f81539e12e19c.tar.gz
packages_apps_Browser-3db2e0733855aefa098ed55b1e5f81539e12e19c.tar.bz2
Set user agent setting when toggling debug
Bug: 3382700 Set the user agent when debug mode is toggled Change-Id: Ide167c7bb32c4f20e6b5965116fbcce01bb1e599
Diffstat (limited to 'src/com/android/browser/BrowserSettings.java')
-rw-r--r--src/com/android/browser/BrowserSettings.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 48f1d6f..faf0042 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -498,8 +498,8 @@ public class BrowserSettings extends Observable implements OnSharedPreferenceCha
quickControls = p.getBoolean(PREF_QUICK_CONTROLS, quickControls);
useMostVisitedHomepage = p.getBoolean(PREF_MOST_VISITED_HOMEPAGE, useMostVisitedHomepage);
- // Only set these on startup if it is a dev build
- if (DEV_BUILD) {
+ // Only set these if this is a dev build or debug is enabled
+ if (DEV_BUILD || showDebugSettings()) {
userAgent = Integer.parseInt(p.getString(PREF_USER_AGENT, "0"));
hardwareAccelerated = p.getBoolean(PREF_HARDWARE_ACCEL, hardwareAccelerated);
}
@@ -601,9 +601,11 @@ public class BrowserSettings extends Observable implements OnSharedPreferenceCha
return showDebugSettings;
}
- public void toggleDebugSettings() {
+ public void toggleDebugSettings(Context context) {
showDebugSettings = !showDebugSettings;
navDump = showDebugSettings;
+ syncSharedPreferences(context,
+ PreferenceManager.getDefaultSharedPreferences(context));
update();
}