summaryrefslogtreecommitdiffstats
path: root/services/core
diff options
context:
space:
mode:
authorIan Pedowitz <ijpedowitz@google.com>2015-08-29 00:31:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-29 00:31:29 +0000
commit8d027e6d523d13a9cf2a5cf4ef901cc3e78b901d (patch)
treecf8addd3a76c71e9a79dc0175e0293c0b81096d0 /services/core
parente774bdd6f09a65886429a2d84a6af7e4b6352280 (diff)
parent3c227bf2418c6d1b6831f0fa7ad0442b0fcbdc07 (diff)
downloadframeworks_base-8d027e6d523d13a9cf2a5cf4ef901cc3e78b901d.zip
frameworks_base-8d027e6d523d13a9cf2a5cf4ef901cc3e78b901d.tar.gz
frameworks_base-8d027e6d523d13a9cf2a5cf4ef901cc3e78b901d.tar.bz2
am 3c227bf2: Merge "Show the ResolverActivity in dock mode" into mnc-dev
* commit '3c227bf2418c6d1b6831f0fa7ad0442b0fcbdc07': Show the ResolverActivity in dock mode
Diffstat (limited to 'services/core')
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java14
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 3f5c270..7112fc8 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;