Merge "Rewrite handling of oob priv-apps in framework."
This commit is contained in:
committed by
Android (Google) Code Review
commit
d2204db2c6
@@ -4063,7 +4063,6 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
|
||||
if (app.info.isPrivilegedApp() &&
|
||||
SystemProperties.getBoolean("pm.dexopt.priv-apps-oob", false)) {
|
||||
runtimeFlags |= Zygote.DISABLE_VERIFIER;
|
||||
runtimeFlags |= Zygote.ONLY_USE_SYSTEM_OAT_FILES;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,11 +111,6 @@ public class PackageDexOptimizer {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We do not dexopt a priv-app package when pm.dexopt.priv-apps-oob is true.
|
||||
if (pkg.isPrivileged()) {
|
||||
return !SystemProperties.getBoolean("pm.dexopt.priv-apps-oob", false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -481,6 +476,11 @@ public class PackageDexOptimizer {
|
||||
boolean isUsedByOtherApps) {
|
||||
int flags = info.flags;
|
||||
boolean vmSafeMode = (flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
|
||||
// When pm.dexopt.priv-apps-oob is true, we only verify privileged apps.
|
||||
if (info.isPrivilegedApp() &&
|
||||
SystemProperties.getBoolean("pm.dexopt.priv-apps-oob", false)) {
|
||||
return "verify";
|
||||
}
|
||||
if (vmSafeMode) {
|
||||
return getSafeModeCompilerFilter(targetCompilerFilter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user