summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/LoadedApk.java
diff options
context:
space:
mode:
authorjgu21 <jinghui.gu@intel.com>2014-12-17 17:23:29 -0500
committerjgu21 <jinghui.gu@intel.com>2014-12-17 17:23:29 -0500
commit4741cd92d1a34d5e7a86b645498df00865f6c651 (patch)
tree463d853852b5e0f881879f06d68c00ef33894c84 /core/java/android/app/LoadedApk.java
parente6d63b94627d0072ff1468feca71698df1a0b64e (diff)
downloadframeworks_base-4741cd92d1a34d5e7a86b645498df00865f6c651.zip
frameworks_base-4741cd92d1a34d5e7a86b645498df00865f6c651.tar.gz
frameworks_base-4741cd92d1a34d5e7a86b645498df00865f6c651.tar.bz2
Get the instruction set that the libraries of secondary Abi is supported.
The secondary Abi is for the apps which support the mulitArch feature. In presence of a native bridge the instruction set supported by secondary Abi might be different than the one secondary Abi used. Change-Id: I318fb21e45c34de6cf1bf8ff63519aaa2b1e2520 Signed-off-by: jgu21 <jinghui.gu@intel.com>
Diffstat (limited to 'core/java/android/app/LoadedApk.java')
-rw-r--r--core/java/android/app/LoadedApk.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index aa98e97..7557fc1 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -45,6 +45,7 @@ import android.util.Slog;
import android.util.SparseArray;
import android.view.DisplayAdjustments;
import android.view.Display;
+import android.os.SystemProperties;
import dalvik.system.VMRuntime;
import java.io.File;
@@ -156,7 +157,12 @@ public final class LoadedApk {
// depending on what the current runtime's instruction set is.
if (info.primaryCpuAbi != null && info.secondaryCpuAbi != null) {
final String runtimeIsa = VMRuntime.getRuntime().vmInstructionSet();
- final String secondaryIsa = VMRuntime.getInstructionSet(info.secondaryCpuAbi);
+
+ // Get the instruction set that the libraries of secondary Abi is supported.
+ // In presence of a native bridge this might be different than the one secondary Abi used.
+ String secondaryIsa = VMRuntime.getInstructionSet(info.secondaryCpuAbi);
+ final String secondaryDexCodeIsa = SystemProperties.get("ro.dalvik.vm.isa." + secondaryIsa);
+ secondaryIsa = secondaryDexCodeIsa.isEmpty() ? secondaryIsa : secondaryDexCodeIsa;
// If the runtimeIsa is the same as the primary isa, then we do nothing.
// Everything will be set up correctly because info.nativeLibraryDir will