Reject a multi-sessin set as APEX (1/n)
Prevent the crash loop in b/163288861#comment1. It doesn't make sense to set a multi-session to APEX at all. We should check and reject this case. Bug: 163288861 Test: N/A, will be added in next CL Change-Id: I23147837a11733b776b1147797b545b539c6c05a
This commit is contained in:
@@ -613,6 +613,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
||||
throw new IllegalArgumentException(
|
||||
"APEX files can only be installed as part of a staged session.");
|
||||
}
|
||||
if (params.isMultiPackage) {
|
||||
throw new IllegalArgumentException("A multi-session can't be set as APEX.");
|
||||
}
|
||||
}
|
||||
|
||||
if (params.isStaged && !isCalledBySystemOrShell(callingUid)) {
|
||||
|
||||
Reference in New Issue
Block a user