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

Commit 1a815921 authored by Nicolas Prevot's avatar Nicolas Prevot
Browse files

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
parent e78aa531
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -819,6 +819,11 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic
                        }
                        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();