Bug 1322029 - Don't allow Fennec to start if 32-bit ABI unsupported. r=jchen, a=lizzard
authorJames Willcox <snorp@snorp.net>
Thu, 02 Feb 2017 12:06:50 -0600
changeset 378377 d666803190e57a9d9cb424c7d53ab2a6f2ef882a
parent 378376 8ee7930272cb4e486f7f6b926ea9837a9d5ca0de
child 378378 739dac1dbd6ad4d93e70bf81956446812092ab58
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen, lizzard
bugs1322029
milestone53.0a2
Bug 1322029 - Don't allow Fennec to start if 32-bit ABI unsupported. r=jchen, a=lizzard
mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareUtils.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareUtils.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareUtils.java
@@ -76,38 +76,38 @@ public final class HardwareUtils {
         return sIsTelevision;
     }
 
     public static int getMemSize() {
         return SysInfo.getMemSize();
     }
 
     public static boolean isARMSystem() {
-        return Build.CPU_ABI != null && Build.CPU_ABI.startsWith("arm");
+        return Build.CPU_ABI != null && Build.CPU_ABI.equals("armeabi-v7a");
     }
 
     public static boolean isX86System() {
-        return Build.CPU_ABI != null && Build.CPU_ABI.startsWith("x86");
+        return Build.CPU_ABI != null && Build.CPU_ABI.equals("x86");
     }
 
     /**
      * @return false if the current system is not supported (e.g. APK/system ABI mismatch).
      */
     public static boolean isSupportedSystem() {
         // We've had crash reports from users on API 10 (with minSDK==15). That shouldn't even install,
         // but since it does we need to protect against it:
         if (Build.VERSION.SDK_INT < AppConstants.Versions.MIN_SDK_VERSION) {
             return false;
         }
 
         // See http://developer.android.com/ndk/guides/abis.html
         final boolean isSystemARM = isARMSystem();
         final boolean isSystemX86 = isX86System();
 
-        boolean isAppARM = BuildConfig.ANDROID_CPU_ARCH.startsWith("arm");
+        boolean isAppARM = BuildConfig.ANDROID_CPU_ARCH.startsWith("armeabi-v7a");
         boolean isAppX86 = BuildConfig.ANDROID_CPU_ARCH.startsWith("x86");
 
         // Only reject known incompatible ABIs. Better safe than sorry.
         if ((isSystemX86 && isAppARM) || (isSystemARM && isAppX86)) {
             return false;
         }
 
         if ((isSystemX86 && isAppX86) || (isSystemARM && isAppARM)) {