diff options
| author | Narayan Kamath <narayan@google.com> | 2014-04-10 09:20:21 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-10 09:20:22 +0000 |
| commit | 09e13cc5f9f98382376eb49bfa6ceb94a50d37a1 (patch) | |
| tree | 892d3deb7188f2840dbd04f6039a8edd55aa236e /core/java/android | |
| parent | 80413c9fe10acf36eaecd139198c7fc17e8af2e6 (diff) | |
| parent | ff0c470833b2cb4130a30895093630242d5f238d (diff) | |
Merge "System services detect and register app CPU ABIs"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 12 | ||||
| -rw-r--r-- | core/java/android/os/Process.java | 12 |
2 files changed, 15 insertions, 9 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 9c46d967f1a8..1a1610d4648c 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -441,6 +441,15 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public String nativeLibraryDir; /** + * The ABI that this application requires, This is inferred from the ABIs + * of the native JNI libraries the application bundles. Will be {@code null} + * if this application does not require any particular ABI. + * + * {@hide} + */ + public String requiredCpuAbi; + + /** * The kernel user-ID that has been assigned to this application; * currently this is not a unique ID (multiple applications can have * the same uid). @@ -570,6 +579,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { sourceDir = orig.sourceDir; publicSourceDir = orig.publicSourceDir; nativeLibraryDir = orig.nativeLibraryDir; + requiredCpuAbi = orig.requiredCpuAbi; resourceDirs = orig.resourceDirs; seinfo = orig.seinfo; sharedLibraryFiles = orig.sharedLibraryFiles; @@ -610,6 +620,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeString(sourceDir); dest.writeString(publicSourceDir); dest.writeString(nativeLibraryDir); + dest.writeString(requiredCpuAbi); dest.writeStringArray(resourceDirs); dest.writeString(seinfo); dest.writeStringArray(sharedLibraryFiles); @@ -649,6 +660,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { sourceDir = source.readString(); publicSourceDir = source.readString(); nativeLibraryDir = source.readString(); + requiredCpuAbi = source.readString(); resourceDirs = source.readStringArray(); seinfo = source.readString(); sharedLibraryFiles = source.readStringArray(); diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 7d2d05181085..10ff27eb38f8 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -466,6 +466,7 @@ public class Process { * @param debugFlags Additional flags. * @param targetSdkVersion The target SDK version for the app. * @param seInfo null-ok SELinux information for the new process. + * @param abi non-null the ABI this app should be started with. * @param zygoteArgs Additional arguments to supply to the zygote process. * * @return An object that describes the result of the attempt to start the process. @@ -479,12 +480,12 @@ public class Process { int debugFlags, int mountExternal, int targetSdkVersion, String seInfo, + String abi, String[] zygoteArgs) { try { return startViaZygote(processClass, niceName, uid, gid, gids, debugFlags, mountExternal, targetSdkVersion, seInfo, - null, /* zygoteAbi TODO: Replace this with the real ABI */ - zygoteArgs); + abi, zygoteArgs); } catch (ZygoteStartFailedEx ex) { Log.e(LOG_TAG, "Starting VM process through Zygote failed"); @@ -702,13 +703,6 @@ public class Process { primaryZygoteState = ZygoteState.connect(ZYGOTE_SOCKET, getNumTries(primaryZygoteState)); } - // TODO: Revert this temporary change. This is required to test - // and submit this change ahead of the package manager changes - // that supply this abi. - if (abi == null) { - return primaryZygoteState; - } - if (primaryZygoteState.matches(abi)) { return primaryZygoteState; } |
