Not using resource ids for EXTRA_INITIAL_INTENTS inside a managed profile.
Inside ResolverActivity: when getting the ResolveInfo for EXTRA_INITIAL_INTENTS:
The ResolveInfo is created directly inside ResolverActivity, not by PackageManagerService.
So, noResourceId had not been set to true for this ResolveInfo.
So setting it inside ResolverActivity.
This is needed since inside a managed profile, the icons are not associated with resource ids.
BUG:17577733
Change-Id: Ic4f0439128f95482167103b783344e2baa0aed52
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index aa55d23..c8d8099 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -819,6 +819,11 @@
}
ResolveInfo ri = new ResolveInfo();
ri.activityInfo = ai;
+ UserManager userManager =
+ (UserManager) getSystemService(Context.USER_SERVICE);
+ if (userManager.isManagedProfile()) {
+ ri.noResourceId = true;
+ }
if (ii instanceof LabeledIntent) {
LabeledIntent li = (LabeledIntent)ii;
ri.resolvePackageName = li.getSourcePackage();