Bug 703056 - Block Flash on Tegra devices r=blassey a=mfinkle
authorJames Willcox <jwillcox@mozilla.com>
Thu, 03 May 2012 17:14:05 -0400
changeset 94176 609e87ff82790893d28685e36f4b69abf8251294
parent 94175 12b1b91efb1bff54d2ab2d156b87135d9e878737
child 94177 982ca139a92ad7463daad1bcad92f908f162489f
push id1237
push userblassey@mozilla.com
push dateWed, 09 May 2012 03:20:09 +0000
treeherdermozilla-aurora@b96241e2daf0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, mfinkle
bugs703056
milestone14.0a2
Bug 703056 - Block Flash on Tegra devices r=blassey a=mfinkle
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -203,16 +203,24 @@ abstract public class GeckoApp
 
     private static final String PLUGIN_SYSTEM_LIB = "/system/lib/plugins/";
 
     private static final String PLUGIN_TYPE = "type";
     private static final String TYPE_NATIVE = "native";
     public ArrayList<PackageInfo> mPackageInfoCache = new ArrayList<PackageInfo>();
 
     String[] getPluginDirectories() {
+
+        // An awful hack to detect Tegra devices. Easiest way to do it without spinning up a EGL context
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+            File tegraDriverPath = new File("/system/lib/hw/gralloc.tegra.so");
+            if (tegraDriverPath.exists())
+                return new String[0];
+        }
+
         // we don't support Honeycomb
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB &&
             Build.VERSION.SDK_INT < 14 /*Build.VERSION_CODES.ICE_CREAM_SANDWICH*/ )
             return new String[0];
 
         Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - start of getPluginDirectories");
 
         ArrayList<String> directories = new ArrayList<String>();