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

Commit 175c22e2 authored by Christopher Tate's avatar Christopher Tate
Browse files

Show the ResolverActivity in dock mode

If there are multiple dock apps present the end result should be
the disambiguation UI, not a fast-forward to the 'normal' home
app.

Bug 23501598

Change-Id: Iebc106b136cb1e446d1e93935738335504f5b812
parent 5983ae7b
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -4230,16 +4230,18 @@ public class PackageManagerService extends IPackageManager.Stub {
                if (ri != null) {
                    return ri;
                }
                if (userId != 0) {
                ri = new ResolveInfo(mResolveInfo);
                ri.activityInfo = new ActivityInfo(ri.activityInfo);
                ri.activityInfo.applicationInfo = new ApplicationInfo(
                        ri.activityInfo.applicationInfo);
                if (userId != 0) {
                    ri.activityInfo.applicationInfo.uid = UserHandle.getUid(userId,
                            UserHandle.getAppId(ri.activityInfo.applicationInfo.uid));
                    return ri;
                }
                return mResolveInfo;
                // Make sure that the resolver is displayable in car mode
                if (ri.activityInfo.metaData == null) ri.activityInfo.metaData = new Bundle();
                ri.activityInfo.metaData.putBoolean(Intent.METADATA_DOCK_HOME, true);
                return ri;
            }
        }
        return null;