Bug 683296 - Change GL layers pref default on Android, but blacklist all devices. r=jrmuizel
authorAli Juma <ajuma@mozilla.com>
Tue, 06 Sep 2011 15:07:07 -0400
changeset 76611 915acb9f6d29b02c5e647b4b46fecfbb0c563fa9
parent 76610 8218f2ac3ce601961a2c0fabf8050f55403030c6
child 76612 830e9ce147b04a01b221539d3e385ffe054e3435
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersjrmuizel
bugs683296
milestone9.0a1
Bug 683296 - Change GL layers pref default on Android, but blacklist all devices. r=jrmuizel
mobile/app/mobile.js
widget/src/android/GfxInfo.cpp
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -568,16 +568,18 @@ pref("services.sync.prefs.sync.signon.re
 
 // threshold where a tap becomes a drag, in 1/240" reference pixels
 // The names of the preferences are to be in sync with nsEventStateManager.cpp
 pref("ui.dragThresholdX", 25);
 pref("ui.dragThresholdY", 25);
 
 #if MOZ_PLATFORM_MAEMO == 6
 pref("layers.acceleration.disabled", false);
+#elifdef ANDROID
+pref("layers.acceleration.disabled", false);
 #else
 pref("layers.acceleration.disabled", true);
 #endif
 
 pref("notification.feature.enabled", true);
 
 // prevent tooltips from showing up
 pref("browser.chrome.toolbar_tips", false);
--- a/widget/src/android/GfxInfo.cpp
+++ b/widget/src/android/GfxInfo.cpp
@@ -266,20 +266,23 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
 
   // For now, we don't implement the downloaded blacklist.
   if (aDriverInfo) {
     *aStatus = status;
     return NS_OK;
   }
 
   if (aFeature == FEATURE_OPENGL_LAYERS) {
-      nsAutoString str;
-      /* Whitelist Galaxy S phones */
-      if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", str)) {
-          if (str != NS_LITERAL_STRING("smdkc110")) {
-            status = FEATURE_BLOCKED_DEVICE;
-          }
-      }
+    /* XXX: Use this code when we're ready to whitelist devices. */
+    // nsAutoString str;
+    // /* Whitelist Galaxy S phones */
+    // if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", str)) {
+    //   if (str != NS_LITERAL_STRING("smdkc110")) {
+    //     status = FEATURE_BLOCKED_DEVICE;
+    //   }
+    // }
+
+    status = FEATURE_BLOCKED_DEVICE;
   }
 
   *aStatus = status;
   return NS_OK;
 }