Merge "Only allow the system or shell to delete oat artifacts"
This commit is contained in:
@@ -6760,6 +6760,9 @@ public class PackageManagerService implements PackageSender, TestUtilityService
|
||||
}
|
||||
|
||||
long deleteOatArtifactsOfPackage(@NonNull Computer snapshot, String packageName) {
|
||||
PackageManagerServiceUtils.enforceSystemOrRootOrShell(
|
||||
"Only the system or shell can delete oat artifacts");
|
||||
|
||||
PackageStateInternal packageState = snapshot.getPackageStateInternal(packageName);
|
||||
if (packageState == null || packageState.getPkg() == null) {
|
||||
return -1; // error code of deleteOptimizedFiles
|
||||
|
||||
Reference in New Issue
Block a user