diff options
author | Narayan Kamath <narayan@google.com> | 2014-06-03 13:24:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-03 13:24:50 +0000 |
commit | dd2e9d3386d2d74f99f79bcad951ff5cdefa6fab (patch) | |
tree | 221b81e8642f3acac78d2934f395dcc52f4b5a30 /packages | |
parent | 797b109c60bda8e122075b0c2101d3f2a0b67c07 (diff) | |
parent | 7cb13f8a0a40f3d971a953b330f38bfcfb001c5e (diff) | |
download | frameworks_base-dd2e9d3386d2d74f99f79bcad951ff5cdefa6fab.zip frameworks_base-dd2e9d3386d2d74f99f79bcad951ff5cdefa6fab.tar.gz frameworks_base-dd2e9d3386d2d74f99f79bcad951ff5cdefa6fab.tar.bz2 |
am 7cb13f8a: Merge "Scan for renderscript files before deciding ABIs."
* commit '7cb13f8a0a40f3d971a953b330f38bfcfb001c5e':
Scan for renderscript files before deciding ABIs.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java index b02aefc..e4de641 100644 --- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java +++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java @@ -88,7 +88,7 @@ public class DefaultContainerService extends IntentService { private IMediaContainerService.Stub mBinder = new IMediaContainerService.Stub() { /** * Creates a new container and copies resource there. - * @param paackageURI the uri of resource to be copied. Can be either + * @param packageURI the uri of resource to be copied. Can be either * a content uri or a file uri * @param cid the id of the secure container that should * be used for creating a secure container into which the resource @@ -342,9 +342,22 @@ public class DefaultContainerService extends IntentService { // The .apk file String codePath = packageURI.getPath(); File codeFile = new File(codePath); - String[] abiList = (abiOverride != null) ? new String[] { abiOverride } - : Build.SUPPORTED_ABIS; NativeLibraryHelper.ApkHandle handle = new NativeLibraryHelper.ApkHandle(codePath); + String[] abiList = Build.SUPPORTED_ABIS; + if (abiOverride != null) { + abiList = new String[] { abiList }; + } else { + try { + if (Build.SUPPORTED_64_BIT_ABIS.length > 0 && + NativeLibraryHelper.hasRenderscriptBitcode(handle)) { + abiList = Build.SUPPORTED_32_BIT_ABIS; + } + } catch (IOException ioe) { + Slog.w(TAG, "Problem determining ABI for: " + codeFile.getPath()); + return null; + } + } + final int abi = NativeLibraryHelper.findSupportedAbi(handle, abiList); // Calculate size of container needed to hold base APK. |