Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ac9f65b authored by Bo Hu's avatar Bo Hu Committed by Automerger Merge Worker
Browse files

Merge "[pm] reject installs of apks with renderscript on 64-bit only devices"...

Merge "[pm] reject installs of apks with renderscript on 64-bit only devices" into sc-dev am: d84462df

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13462380

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4051abf8f64b0c7fe0fde52d7ad7ec529455fd22
parents 526ab171 d84462df
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.pm;

import static android.content.pm.PackageManager.INSTALL_FAILED_CPU_ABI_INCOMPATIBLE;
import static android.content.pm.PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
import static android.content.pm.parsing.ApkLiteParseUtils.isApkFile;
import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER;
@@ -407,8 +408,14 @@ final class PackageAbiHelperImpl implements PackageAbiHelper {
                boolean needsRenderScriptOverride = false;
                if (Build.SUPPORTED_64_BIT_ABIS.length > 0 && cpuAbiOverride == null
                        && NativeLibraryHelper.hasRenderscriptBitcode(handle)) {
                    if (Build.SUPPORTED_32_BIT_ABIS.length > 0) {
                        abiList = Build.SUPPORTED_32_BIT_ABIS;
                        needsRenderScriptOverride = true;
                    } else {
                        throw new PackageManagerException(
                                INSTALL_FAILED_CPU_ABI_INCOMPATIBLE,
                                "Apks with renderscript are not supported on 64-bit only devices");
                    }
                }

                final int copyRet;