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

Commit ed1391a9 authored by Narayan Kamath's avatar Narayan Kamath Committed by Android (Google) Code Review
Browse files

Merge "Handle apps that share a UID with the system_server correctly." into lmp-dev

parents cf0cf475 340ca8b7
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -5226,6 +5226,7 @@ public class PackageManagerService extends IPackageManager.Stub {
            // The system package is special.
            dataPath = new File (Environment.getDataDirectory(), "system");
            pkg.applicationInfo.dataDir = dataPath.getPath();
        } else {
            // This is a normal package, need to make its data directory.
            dataPath = getDataPathForPackage(pkg.packageName, 0);
@@ -5516,6 +5517,15 @@ public class PackageManagerService extends IPackageManager.Stub {
            }
        }
        // This is a special case for the "system" package, where the ABI is
        // dictated by the zygote configuration (and init.rc). We should keep track
        // of this ABI so that we can deal with "normal" applications that run under
        // the same UID correctly.
        if (mPlatformPackage == pkg) {
            pkg.applicationInfo.primaryCpuAbi = VMRuntime.getRuntime().is64Bit() ?
                    Build.SUPPORTED_64_BIT_ABIS[0] : Build.SUPPORTED_32_BIT_ABIS[0];
        }
        pkgSetting.primaryCpuAbiString = pkg.applicationInfo.primaryCpuAbi;
        pkgSetting.secondaryCpuAbiString = pkg.applicationInfo.secondaryCpuAbi;