aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authormapfau <pfau@peak3d.de>2016-09-30 15:13:34 +0200
committerwsnipex <wsnipex@a1.net>2016-10-09 11:23:44 +0200
commite43c1e89297e9966027c0d4bad6b840860f0f562 (patch)
tree0d87fbdd36038025f047976c8a30e9be808ba2ae /tools
parent5cbc84c57ff0ae1795229fa81ac7619995c9e40a (diff)
[android] splash fix for arm64
Diffstat (limited to 'tools')
-rw-r--r--tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in68
1 files changed, 30 insertions, 38 deletions
diff --git a/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in b/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in
index f52498c15c..41a5d3dad1 100644
--- a/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in
+++ b/tools/android/packaging/xbmc/src/org/xbmc/kodi/Splash.java.in
@@ -682,53 +682,45 @@ public class Splash extends Activity {
mStateMachine.sendEmptyMessage(Checking);
- String curArch = "";
- String curArch2 = "";
- try
- {
- curArch = Build.CPU_ABI.substring(0,3);
- } catch (IndexOutOfBoundsException e)
- {
- mErrorMsg = "Error! Unexpected architecture: " + Build.CPU_ABI;
+ String pkg_arch = "";
+ // Read the properties
+ try {
+ Resources resources = this.getResources();
+ InputStream xbmcprop = resources.openRawResource(R.raw.xbmc);
+ Properties properties = new Properties();
+ properties.load(xbmcprop);
+ pkg_arch = properties.getProperty("native_arch");
+ } catch (NotFoundException e) {
+ mErrorMsg = "Cannot find properties file";
+ Log.e(TAG, mErrorMsg);
+ mState = InError;
+ } catch (IOException e) {
+ mErrorMsg = "Failed to open properties file";
Log.e(TAG, mErrorMsg);
mState = InError;
}
- try
- {
- curArch2 = Build.CPU_ABI2.substring(0,3);
- } catch (IndexOutOfBoundsException e) {}
- if (mState != InError)
+ boolean arch_ok = false;
+ String[] abis = Build.SUPPORTED_ABIS;
+ for (int i=0; i<abis.length; ++i)
{
- // Check if we are on the proper arch
-
- // Read the properties
- try {
- Resources resources = this.getResources();
- InputStream xbmcprop = resources.openRawResource(R.raw.xbmc);
- Properties properties = new Properties();
- properties.load(xbmcprop);
-
- if (!curArch.equalsIgnoreCase(properties.getProperty("native_arch"))
- && !curArch2.equalsIgnoreCase(properties.getProperty("native_arch")))
- {
- mErrorMsg = "This @APP_NAME@ package is not compatible with your device (device=" + curArch + " vs. package=" + properties.getProperty("native_arch") +").\nPlease check the <a href=\"http://wiki.kodi.tv/index.php?title=XBMC_for_Android_specific_FAQ\">Kodi Android wiki</a> for more information.";
- Log.e(TAG, mErrorMsg);
- mState = InError;
- }
- } catch (NotFoundException e) {
- mErrorMsg = "Cannot find properties file";
- Log.e(TAG, mErrorMsg);
- mState = InError;
- } catch (IOException e) {
- mErrorMsg = "Failed to open properties file";
- Log.e(TAG, mErrorMsg);
- mState = InError;
+ Log.i(TAG, "ABI: " + abis[i]);
+ if (abis[i].equalsIgnoreCase(pkg_arch))
+ {
+ arch_ok = true;
+ //break;
}
}
+ if (!arch_ok)
+ {
+ mErrorMsg = "This package is not compatible with your device (" + pkg_arch +").\nPlease check the <a href=\"http://wiki.kodi.tv/index.php?title=XBMC_for_Android_specific_FAQ\">Kodi Android wiki</a> for more information.";
+ Log.e(TAG, mErrorMsg);
+ mState = InError;
+ }
+
if (mState != InError) {
- if (curArch.equalsIgnoreCase("arm")) {
+ if (pkg_arch.equalsIgnoreCase("arm")) {
// arm arch: check if the cpu supports neon
boolean ret = ParseCpuFeature();
//Log.d(TAG, "/proc/cpuinfo = " + mCpuinfo);