diff options
author | Christopher Tate <ctate@google.com> | 2015-08-27 15:09:53 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2015-08-27 16:16:41 -0700 |
commit | 175c22e2018dabad28ec11b81d03096766a6eb66 (patch) | |
tree | 7813493b98fde5731de3e36fd8730dd09d863ce2 /services/core | |
parent | 5983ae7b98bbe16b8a0a5ffe9203baa1ed58a8fb (diff) | |
download | frameworks_base-175c22e2018dabad28ec11b81d03096766a6eb66.zip frameworks_base-175c22e2018dabad28ec11b81d03096766a6eb66.tar.gz frameworks_base-175c22e2018dabad28ec11b81d03096766a6eb66.tar.bz2 |
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
Diffstat (limited to 'services/core')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 74200cb..6c3e78f 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -4230,16 +4230,18 @@ public class PackageManagerService extends IPackageManager.Stub { if (ri != null) { return ri; } + ri = new ResolveInfo(mResolveInfo); + ri.activityInfo = new ActivityInfo(ri.activityInfo); + ri.activityInfo.applicationInfo = new ApplicationInfo( + ri.activityInfo.applicationInfo); if (userId != 0) { - ri = new ResolveInfo(mResolveInfo); - ri.activityInfo = new ActivityInfo(ri.activityInfo); - ri.activityInfo.applicationInfo = new ApplicationInfo( - ri.activityInfo.applicationInfo); 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; |