Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63cd0b60 authored by JW Wang's avatar JW Wang
Browse files

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
parent 31bb4ab9
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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 {