Bug 1142988 - Try harder to disable Flash on Tegra devices r=droeh, a=lizzard
authorJames Willcox <snorp@snorp.net>
Thu, 03 Mar 2016 10:09:21 -0600
changeset 323625 0eb133efdeeb479a959df87061978a3dc1da83a3
parent 323624 809b0f59b556235fbf7c51a4f3c45783bc68c347
child 323626 9bea3ad9b32f767d7d4ee2edf53a95da7424f61c
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdroeh, lizzard
bugs1142988
milestone47.0a2
Bug 1142988 - Try harder to disable Flash on Tegra devices r=droeh, a=lizzard
mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
@@ -1930,17 +1930,18 @@ public class GeckoAppShell
     private static final String TYPE_NATIVE = "native";
     public static final ArrayList<PackageInfo> mPackageInfoCache = new ArrayList<>();
 
     // Returns null if plugins are blocked on the device.
     static String[] getPluginDirectories() {
 
         // An awful hack to detect Tegra devices. Easiest way to do it without spinning up a EGL context.
         boolean isTegra = (new File("/system/lib/hw/gralloc.tegra.so")).exists() ||
-                          (new File("/system/lib/hw/gralloc.tegra3.so")).exists();
+                          (new File("/system/lib/hw/gralloc.tegra3.so")).exists() ||
+                          (new File("/sys/class/nvidia-gpu")).exists();
         if (isTegra) {
             // disable on KitKat (bug 957694)
             if (Versions.feature19Plus) {
                 Log.w(LOGTAG, "Blocking plugins because of Tegra (bug 957694)");
                 return null;
             }
 
             // disable Flash on Tegra ICS with CM9 and other custom firmware (bug 736421)