diff options
author | Chirayu Desai <cdesai@cyanogenmod.org> | 2013-02-23 19:13:56 +0530 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-03-24 15:28:20 -0700 |
commit | b5626d66ce6a845a61f1b4042f575c118d198344 (patch) | |
tree | e874e79718f5bafcbb7a915caae1e0fa5989b8ae /src/com/android/browser | |
parent | 1cba756a374adb20f96c7d8c1c5bfc757c34d6c1 (diff) | |
download | packages_apps_browser-b5626d66ce6a845a61f1b4042f575c118d198344.zip packages_apps_browser-b5626d66ce6a845a61f1b4042f575c118d198344.tar.gz packages_apps_browser-b5626d66ce6a845a61f1b4042f575c118d198344.tar.bz2 |
Allow enabling WebSockets from Labs Preferences
Change-Id: Ia0dc06cbd4f2e8e340a8f8ee910a6310a5079d79
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 6 | ||||
-rw-r--r-- | src/com/android/browser/PreferenceKeys.java | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index 8ed824e..efab039 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -279,6 +279,7 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, settings.setAutoFillProfile(getAutoFillProfile()); setIsWebGLAvailable(settings.isWebGLAvailable()); settings.setWebGLEnabled(isWebGLAvailable() && isWebGLEnabled()); + settings.setWebSocketsEnabled(isWebSocketsEnabled()); String ua = mCustomUserAgents.get(settings); if (ua != null) { @@ -849,6 +850,11 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, return mPrefs.getBoolean(PREF_ENABLE_WEBGL, true); } + public boolean isWebSocketsEnabled() { + return mPrefs.getBoolean(PREF_ENABLE_WEBSOCKETS, false); + } + + // ----------------------------- // getter/setters for privacy_security_preferences.xml // ----------------------------- diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java index 2de1073..b0bade2 100644 --- a/src/com/android/browser/PreferenceKeys.java +++ b/src/com/android/browser/PreferenceKeys.java @@ -84,6 +84,7 @@ public interface PreferenceKeys { static final String PREF_ENABLE_QUICK_CONTROLS = "enable_quick_controls"; static final String PREF_FULLSCREEN = "fullscreen"; static final String PREF_ENABLE_WEBGL = "enable_webgl"; + static final String PREF_ENABLE_WEBSOCKETS = "enable_websockets"; // ---------------------- // Keys for privacy_security_preferences.xml |