Fix #addChildSessionId (1/n)
A single-session can't have child. Bug: 162286562 Test: Will be added in next CLs Change-Id: I17037a6a65599a74cffd12fffc741b924143dc1a
This commit is contained in:
@@ -3092,6 +3092,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
|
||||
@Override
|
||||
public void addChildSessionId(int childSessionId) {
|
||||
if (!params.isMultiPackage) {
|
||||
throw new IllegalStateException("Single-session " + sessionId + " can't have child.");
|
||||
}
|
||||
|
||||
final PackageInstallerSession childSession = mSessionProvider.getSession(childSessionId);
|
||||
if (childSession == null) {
|
||||
throw new IllegalStateException("Unable to add child session " + childSessionId
|
||||
|
||||
Reference in New Issue
Block a user