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

Commit 2b914652 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix adb install

Was not properly handling creating DefContainerService when the installation was
for USER_ALL. Not a problem for Market installs.

Bug: 7061571
Change-Id: I4528b4c56e38effa137da56460e78c55b242ba45
parent 080ca09c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -729,7 +729,7 @@ public class ActiveServices {
                ServiceInfo sInfo =
                    rInfo != null ? rInfo.serviceInfo : null;
                if (sInfo == null) {
                    Slog.w(TAG, "Unable to start service " + service +
                    Slog.w(TAG, "Unable to start service " + service + " U=" + userId +
                          ": not found");
                    return null;
                }
+7 −1
Original line number Diff line number Diff line
@@ -473,6 +473,9 @@ public class PackageManagerService extends IPackageManager.Stub {
            mContainerServiceUserId = 0;
            if (mPendingInstalls.size() > 0) {
                mContainerServiceUserId = mPendingInstalls.get(0).getUser().getIdentifier();
                if (mContainerServiceUserId == UserHandle.USER_ALL) {
                    mContainerServiceUserId = 0;
                }
            }
            if (mContext.bindService(service, mDefContainerConn,
                    Context.BIND_AUTO_CREATE, mContainerServiceUserId)) {
@@ -554,7 +557,10 @@ public class PackageManagerService extends IPackageManager.Stub {
                        if (params != null) {
                            // Check if we're connected to the correct service, if it's an install
                            // request.
                            if (params.getUser().getIdentifier() != mContainerServiceUserId) {
                            final int installFor = params.getUser().getIdentifier();
                            if (installFor != mContainerServiceUserId
                                    && (installFor == UserHandle.USER_ALL
                                            && mContainerServiceUserId != 0)) {
                                mHandler.sendEmptyMessage(MCS_RECONNECT);
                                return;
                            }