summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2015-02-10 16:23:51 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-02-10 16:23:51 +0000
commit16df82d7ace0dbe625211561ccec9b6faf81debb (patch)
tree34dc19d23608e56db4e95f052a1345392454face /core/java/android/app
parentc052b0efcef4c8656a972155c6a88135f79ed808 (diff)
parentd1e074a72452c909c7ed2a4baf220d9d2f306b20 (diff)
downloadframeworks_base-16df82d7ace0dbe625211561ccec9b6faf81debb.zip
frameworks_base-16df82d7ace0dbe625211561ccec9b6faf81debb.tar.gz
frameworks_base-16df82d7ace0dbe625211561ccec9b6faf81debb.tar.bz2
am fd523efc: Merge "Get the instruction set that the libraries of secondary Abi is supported."
automerge: d1e074a * commit 'd1e074a72452c909c7ed2a4baf220d9d2f306b20': Get the instruction set that the libraries of secondary Abi is supported.
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/ApplicationPackageManager.java8
-rw-r--r--core/java/android/app/LoadedApk.java8
2 files changed, 14 insertions, 2 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 967e97e..d808c8b 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -63,6 +63,7 @@ import android.os.UserManager;
import android.util.ArrayMap;
import android.util.Log;
import android.view.Display;
+import android.os.SystemProperties;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.Preconditions;
@@ -287,7 +288,12 @@ final class ApplicationPackageManager extends PackageManager {
// 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
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index b01f87e..83c6c2b 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