Bug 1142988 - Try harder to disable Flash on Tegra devices r=droeh
authorJames Willcox <snorp@snorp.net>
Thu, 03 Mar 2016 10:09:21 -0600
changeset 287099 4beeb84a6696c4c25357899cee3ce90576914c11
parent 287098 32c6f4faef5aeef5d48d0ac5d35aaadeaf4f6943
child 287100 7bb636bd183b96f1c61ee24cd67da024d699c69c
push id73050
push userjwillcox@mozilla.com
push dateMon, 07 Mar 2016 22:16:31 +0000
treeherdermozilla-inbound@4beeb84a6696 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdroeh
bugs1142988
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1142988 - Try harder to disable Flash on Tegra devices r=droeh
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)