Fix #addChildSessionId (2/n)

A multi-session can't be a child.

Bug: 162286562
Test: Will be added in next CLs
Change-Id: I7e9957f0cd57fe924cfb5ba8f0cfb27b045f26dc
This commit is contained in:
JW Wang
2020-07-28 12:49:30 +08:00
parent d16e9d3b5d
commit 35da764125

View File

@@ -3101,6 +3101,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
throw new IllegalStateException("Unable to add child session " + childSessionId
+ " as it does not exist.");
}
if (childSession.params.isMultiPackage) {
throw new IllegalStateException("Multi-session " + childSessionId
+ " can't be a child.");
}
try {
acquireTransactionLock();