Clean up parent session when all children complete successfully (1/n)
The parent is finished when all children are finished. This change gives us a consistent states across parent and children. Bug: 163744647 Test: N/A, will be added in next CL Change-Id: Id5a21fc8cf91b9e33f762df7858f4fdde0c91bf7
This commit is contained in:
@@ -1328,12 +1328,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
if (PackageInstaller.STATUS_SUCCESS == status) {
|
||||
mChildSessionsRemaining.removeAt(sessionIndex);
|
||||
if (mChildSessionsRemaining.size() == 0) {
|
||||
try {
|
||||
intent.putExtra(PackageInstaller.EXTRA_SESSION_ID,
|
||||
PackageInstallerSession.this.sessionId);
|
||||
mStatusReceiver.sendIntent(mContext, 0, intent, null, null);
|
||||
} catch (IntentSender.SendIntentException ignore) {
|
||||
}
|
||||
destroyInternal();
|
||||
dispatchSessionFinished(PackageManager.INSTALL_SUCCEEDED,
|
||||
"Session installed", null);
|
||||
}
|
||||
} else if (PackageInstaller.STATUS_PENDING_USER_ACTION == status) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user