summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-10-04 17:21:10 -0700
committerJohn Reck <jreck@google.com>2011-10-04 17:21:10 -0700
commit1da8188e950f6e68e1edd44fb5b5dbfc8cc2c349 (patch)
treea4d6f6f33440821b5919dfe92bf2e52288646a6e
parent81260dfcd9150173416598bdd3d44190a00e6c95 (diff)
downloadpackages_apps_Browser-1da8188e950f6e68e1edd44fb5b5dbfc8cc2c349.zip
packages_apps_Browser-1da8188e950f6e68e1edd44fb5b5dbfc8cc2c349.tar.gz
packages_apps_Browser-1da8188e950f6e68e1edd44fb5b5dbfc8cc2c349.tar.bz2
Disable hardware skia when debug is disabled
Bug: 5413097 Change-Id: I7870e91fb981496fcc608a3473b4534cdcf0c345
-rw-r--r--src/com/android/browser/BrowserSettings.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index b9eec9c..5920e58 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -20,6 +20,7 @@ import android.app.ActivityManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Build;
import android.os.Message;
@@ -427,7 +428,13 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
}
public void setDebugEnabled(boolean value) {
- mPrefs.edit().putBoolean(PREF_DEBUG_MENU, value).apply();
+ Editor edit = mPrefs.edit();
+ edit.putBoolean(PREF_DEBUG_MENU, value);
+ if (!value) {
+ // Reset to "safe" value
+ edit.putBoolean(PREF_ENABLE_HARDWARE_ACCEL_SKIA, false);
+ }
+ edit.apply();
}
public void clearCache() {