summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-19 00:34:48 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-19 00:43:50 +0000
commitbf5e496dc1f5f69b6c24a03828e89849a5587235 (patch)
tree3922308d5db1efb299bb343b3e212df45b560138
parentdcdefbcc57480be5c32584cf75628d76da16ffe8 (diff)
downloadpackages_apps_browser-bf5e496dc1f5f69b6c24a03828e89849a5587235.zip
packages_apps_browser-bf5e496dc1f5f69b6c24a03828e89849a5587235.tar.gz
packages_apps_browser-bf5e496dc1f5f69b6c24a03828e89849a5587235.tar.bz2
Revert "Runtime enablement of WebGL"
This reverts commit 0059fc7aaf5a8c141f7753b2574240e7dee53885. Change-Id: I799965f86443f75a1e1576c54ffec31532c58ebe
-rw-r--r--res/values/strings.xml16
-rw-r--r--res/xml-sw600dp/lab_preferences.xml5
-rw-r--r--res/xml/lab_preferences.xml8
-rw-r--r--src/com/android/browser/BrowserSettings.java16
-rw-r--r--src/com/android/browser/PreferenceKeys.java1
-rw-r--r--src/com/android/browser/preferences/LabPreferencesFragment.java9
6 files changed, 10 insertions, 45 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 62d40fb..c420e4a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5,9 +5,9 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -174,7 +174,7 @@
<string name="bookmark_cannot_save_url">This URL can\'t be bookmarked.</string>
<!-- Menu item in the page that displays all bookmarks. It brings up a
dialog that allows the user to bookmark the page that the browser is
- currently on, but is not visible because the bookmarks page is
+ currently on, but is not visible because the bookmarks page is
showing. -->
<string name="bookmark_page">Bookmark last-viewed page</string>
<!-- Menu item in the page that displays all bookmarks. Switches to
@@ -270,7 +270,7 @@
<!-- Context Menu item to show the currently selected address in the Maps
application -->
<string name="contextmenu_map">Map</string>
-
+
<!-- Title of the dialog used for selecting the application that should be
used for sharing a link (e.g. Gmail or another app). See also
contextmenu_sharelink above -->
@@ -654,10 +654,6 @@
<!-- Summary for the fullscreen lab feature [CHAR LIMIT=120] -->
<string name="pref_lab_fullscreen_summary">
Use fullscreen mode to hide the status bar</string>
- <!-- Title for the WebGL feature [CHAR LIMIT=40] -->
- <string name="pref_lab_webgl">WebGL</string>
- <!-- Summary for the WebGL lab feature [CHAR LIMIT=120] -->
- <string name="pref_lab_webgl_summary">Enables WebGL</string>
<!-- Title for bandwidth management preference [CHAR LIMIT=25] -->
<string name="pref_data_title">Bandwidth management</string>
<!-- Title for search preloading [CHAR LIMIT=40] -->
@@ -754,7 +750,7 @@
<!-- Verb placed in front of a screenshot of a web page that, when clicked,
will add that page to bookmarks -->
<string name="add_bookmark_short">Add</string>
-
+
<!-- This string is for the browser "Go To" UI. -->
<!-- Do not translate. This string is not displayed in UI (no badge is selected for go to). -->
<string name="search_label" translatable="false">Browser</string>
@@ -874,7 +870,7 @@
<string name="webstorage_outofspace_notification_text">Touch to free up space.</string>
<!-- Used in the Browser Settings -->
<string name="webstorage_clear_data_title">Clear stored data</string>
-
+
<!-- Confirmation dialog when the user ask to clear all data for an origin -->
<string name="webstorage_clear_data_dialog_message">Delete all data stored by this website?</string>
<string name="webstorage_clear_data_dialog_ok_button">OK</string>
diff --git a/res/xml-sw600dp/lab_preferences.xml b/res/xml-sw600dp/lab_preferences.xml
index 95cacb0..a7151e0 100644
--- a/res/xml-sw600dp/lab_preferences.xml
+++ b/res/xml-sw600dp/lab_preferences.xml
@@ -21,9 +21,4 @@
android:defaultValue="false"
android:title="@string/pref_lab_quick_controls"
android:summary="@string/pref_lab_quick_controls_summary" />
- <CheckBoxPreference
- android:key="enable_webgl"
- android:defaultValue="true"
- android:title="@string/pref_lab_webgl"
- android:summary="@string/pref_lab_webgl_summary" />
</PreferenceScreen>
diff --git a/res/xml/lab_preferences.xml b/res/xml/lab_preferences.xml
index 95cacb0..3320cee 100644
--- a/res/xml/lab_preferences.xml
+++ b/res/xml/lab_preferences.xml
@@ -22,8 +22,8 @@
android:title="@string/pref_lab_quick_controls"
android:summary="@string/pref_lab_quick_controls_summary" />
<CheckBoxPreference
- android:key="enable_webgl"
- android:defaultValue="true"
- android:title="@string/pref_lab_webgl"
- android:summary="@string/pref_lab_webgl_summary" />
+ android:key="fullscreen"
+ android:defaultValue="false"
+ android:title="@string/pref_lab_fullscreen"
+ android:summary="@string/pref_lab_fullscreen_summary" />
</PreferenceScreen>
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 8dadfc8..cec3b30 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -130,8 +130,6 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
private static String sFactoryResetUrl;
- private static boolean sWebGLAvailable;
-
public static void initialize(final Context context) {
sInstance = new BrowserSettings(context);
}
@@ -278,8 +276,6 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
settings.setSaveFormData(saveFormdata());
settings.setUseWideViewPort(isWideViewport());
settings.setAutoFillProfile(getAutoFillProfile());
- setIsWebGLAvailable(settings.isWebGLAvailable());
- settings.setWebGLEnabled(isWebGLAvailable() && isWebGLEnabled());
String ua = mCustomUserAgents.get(settings);
if (ua != null) {
@@ -846,10 +842,6 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
return 1 + (mPrefs.getInt(PREF_INVERTED_CONTRAST, 0) / 10f);
}
- public boolean isWebGLEnabled() {
- return mPrefs.getBoolean(PREF_ENABLE_WEBGL, true);
- }
-
// -----------------------------
// getter/setters for privacy_security_preferences.xml
// -----------------------------
@@ -942,14 +934,6 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
return mPrefs.getString(PREF_VIDEO_PRELOAD, getDefaultVideoPreloadSetting());
}
- private static void setIsWebGLAvailable(boolean available) {
- sWebGLAvailable = available;
- }
-
- public static boolean isWebGLAvailable() {
- return sWebGLAvailable;
- }
-
// -----------------------------
// getter/setters for browser recovery
// -----------------------------
diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java
index 594bd81..405d893 100644
--- a/src/com/android/browser/PreferenceKeys.java
+++ b/src/com/android/browser/PreferenceKeys.java
@@ -84,7 +84,6 @@ 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";
// ----------------------
// Keys for privacy_security_preferences.xml
diff --git a/src/com/android/browser/preferences/LabPreferencesFragment.java b/src/com/android/browser/preferences/LabPreferencesFragment.java
index 8d33c95..222b5fa 100644
--- a/src/com/android/browser/preferences/LabPreferencesFragment.java
+++ b/src/com/android/browser/preferences/LabPreferencesFragment.java
@@ -17,10 +17,8 @@
package com.android.browser.preferences;
import android.os.Bundle;
-import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
-import android.preference.PreferenceScreen;
import com.android.browser.BrowserSettings;
import com.android.browser.PreferenceKeys;
@@ -34,12 +32,5 @@ public class LabPreferencesFragment extends PreferenceFragment {
super.onCreate(savedInstanceState);
// Load the XML preferences file
addPreferencesFromResource(R.xml.lab_preferences);
-
- if (!BrowserSettings.isWebGLAvailable()) {
- CheckBoxPreference webGL = (CheckBoxPreference)
- findPreference(PreferenceKeys.PREF_ENABLE_WEBGL);
- PreferenceScreen screen = getPreferenceScreen();
- screen.removePreference(webGL);
- }
}
}