diff options
author | Michael Kolb <kolby@google.com> | 2010-12-15 11:52:57 -0800 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2010-12-15 11:53:02 -0800 |
commit | 376b54116e38b3b94c4d64663d1bff38352b0e59 (patch) | |
tree | 97d9f406203b494b7dc529d17d8728858942d3ad /src/com/android/browser/BrowserSettings.java | |
parent | 439c9a58765aa6aab95d55422ee61ea8360e912d (diff) | |
download | packages_apps_Browser-376b54116e38b3b94c4d64663d1bff38352b0e59.zip packages_apps_Browser-376b54116e38b3b94c4d64663d1bff38352b0e59.tar.gz packages_apps_Browser-376b54116e38b3b94c4d64663d1bff38352b0e59.tar.bz2 |
Add quick controls
Bug: http://b/issue?id=3277888
Added Quick Controls Lab setting
Implemented Quick Controls UI
Change-Id: I72011daf9140aa5d15c8b785126867c10bbc5501
Diffstat (limited to 'src/com/android/browser/BrowserSettings.java')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index 1f091e2..1b8acc6 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -117,6 +117,9 @@ public class BrowserSettings extends Observable implements OnSharedPreferenceCha private boolean navDump = false; private boolean hardwareAccelerated = true; + // Lab settings + private boolean quickControls = false; + // By default the error console is shown once the user navigates to about:debug. // The setting can be then toggled from the settings menu. private boolean showConsole = true; @@ -167,6 +170,8 @@ public class BrowserSettings extends Observable implements OnSharedPreferenceCha public final static String PREF_HARDWARE_ACCEL = "enable_hardware_accel"; public final static String PREF_USER_AGENT = "user_agent"; + public final static String PREF_QUICK_CONTROLS = "enable_quick_controls"; + private static final String DESKTOP_USERAGENT = "Mozilla/5.0 (Macintosh; " + "U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/533.16 (KHTML, " + "like Gecko) Version/5.0 Safari/533.16"; @@ -490,6 +495,8 @@ public class BrowserSettings extends Observable implements OnSharedPreferenceCha navDump = p.getBoolean("enable_nav_dump", navDump); } + quickControls = p.getBoolean(PREF_QUICK_CONTROLS, quickControls); + // Only set these on startup if it is a dev build if (DEV_BUILD) { userAgent = Integer.parseInt(p.getString(PREF_USER_AGENT, "0")); @@ -573,6 +580,10 @@ public class BrowserSettings extends Observable implements OnSharedPreferenceCha return hardwareAccelerated; } + public boolean useQuickControls() { + return quickControls; + } + public boolean showDebugSettings() { return showDebugSettings; } @@ -836,6 +847,8 @@ public class BrowserSettings extends Observable implements OnSharedPreferenceCha } else if (PREF_USER_AGENT.equals(key)) { userAgent = Integer.parseInt(p.getString(PREF_USER_AGENT, "0")); update(); + } else if (PREF_QUICK_CONTROLS.equals(key)) { + quickControls = p.getBoolean(PREF_QUICK_CONTROLS, quickControls); } } } |