[Android] Util: fix x86 detection on some broken Orange phones

Edward Wang git at videolan.org
Sat Sep 1 08:50:37 CEST 2012


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sat Sep  1 02:49:50 2012 -0400| [d420e4321f2ec82170b513c4d44e07e174648b0c] | committer: Edward Wang

Util: fix x86 detection on some broken Orange phones

Like CPU_ABI = x86 and CPU_ABI2 = armeabi (without it the code will hit the second condition which is _wrong_.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=d420e4321f2ec82170b513c4d44e07e174648b0c
---

 vlc-android/src/org/videolan/vlc/Util.java |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/Util.java b/vlc-android/src/org/videolan/vlc/Util.java
index 429d39b..465d178 100644
--- a/vlc-android/src/org/videolan/vlc/Util.java
+++ b/vlc-android/src/org/videolan/vlc/Util.java
@@ -265,15 +265,15 @@ public class Util {
         boolean hasNeon = false, hasFpu = false, hasArmV6 = false, hasArmV7 = false;
         boolean hasX86 = false;
 
-        if(android.os.Build.CPU_ABI.equals("armeabi-v7a") ||
+        if(android.os.Build.CPU_ABI.equals("x86")) {
+            hasX86 = true;
+        } else if(android.os.Build.CPU_ABI.equals("armeabi-v7a") ||
            android.os.Build.CPU_ABI2.equals("armeabi-v7a")) {
             hasArmV7 = true;
             hasArmV6 = true; /* Armv7 is backwards compatible to < v6 */
         } else if(android.os.Build.CPU_ABI.equals("armeabi") ||
                   android.os.Build.CPU_ABI2.equals("armeabi")) {
             hasArmV6 = true;
-        } else if(android.os.Build.CPU_ABI.equals("x86")) {
-            hasX86 = true;
         }
 
         try {



More information about the Android mailing list