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

Commit 1c9edafe authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Clear pending operation flag when move failed.

Bug: 17298448
Change-Id: I7a4af0f31d3909a9bfb5a2dd7d168015786024e3
parent 780617fa
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -12914,6 +12914,17 @@ public class PackageManagerService extends IPackageManager.Stub {
                    Bundle extras) throws RemoteException {
                Slog.d(TAG, "Install result for move: "
                        + PackageManager.installStatusToString(returnCode, msg));
                // We usually have a new package now after the install, but if
                // we failed we need to clear the pending flag on the original
                // package object.
                synchronized (mPackages) {
                    final PackageParser.Package pkg = mPackages.get(packageName);
                    if (pkg != null) {
                        pkg.mOperationPending = false;
                    }
                }
                final int status = PackageManager.installStatusToPublicStatus(returnCode);
                switch (status) {
                    case PackageInstaller.STATUS_SUCCESS: