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

Commit 43327a61 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Fix regression in renderscript detection.

We must persist the selected (32 bit) ABI for legacy
renderscript apps so that we can launch them correctly.

bug: 16569287

Change-Id: I944acd0cf56ddb1f27337e01bca1b24cd369eb8f
parent 73f1856f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5486,9 +5486,11 @@ public class PackageManagerService extends IPackageManager.Stub {
                    // SDK tools. We must scan their APKs for renderscript bitcode and
                    // not launch them if it's present. Don't bother checking on devices
                    // that don't have 64 bit support.
                    boolean needsRenderScriptOverride = false;
                    if (Build.SUPPORTED_64_BIT_ABIS.length > 0 && abiOverride == null &&
                            NativeLibraryHelper.hasRenderscriptBitcode(handle)) {
                        abiList = Build.SUPPORTED_32_BIT_ABIS;
                        needsRenderScriptOverride = true;
                    }
                    final int copyRet;
@@ -5508,6 +5510,8 @@ public class PackageManagerService extends IPackageManager.Stub {
                        pkg.applicationInfo.primaryCpuAbi = abiList[copyRet];
                    } else if (copyRet == PackageManager.NO_NATIVE_LIBRARIES && abiOverride != null) {
                        pkg.applicationInfo.primaryCpuAbi = abiOverride;
                    } else if (needsRenderScriptOverride) {
                        pkg.applicationInfo.primaryCpuAbi = abiList[0];
                    }
                }
            } catch (IOException ioe) {