am a456d886: am 1fcd7faa: Merge "Clears previously added cross-profile-intents" into lmp-dev

* commit 'a456d886644052e9c32a826f32aaaa089e0104ee':
  Clears previously added cross-profile-intents
This commit is contained in:
Alexandra Gherghina
2014-08-06 13:49:55 +00:00
committed by Android Git Automerger

View File

@@ -47,12 +47,15 @@ public class ManagedProfileSetup extends BroadcastReceiver {
return;
}
final PackageManager pm = context.getPackageManager();
// Clear any previous intent forwarding we set up
pm.clearCrossProfileIntentFilters(UserHandle.myUserId());
// Set up intent forwarding for implicit intents
Intent intent = new Intent();
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setPackage(context.getPackageName());
final PackageManager pm = context.getPackageManager();
// Resolves activities for the managed profile (which we're running as)
List<ResolveInfo> resolvedIntents = pm.queryIntentActivities(intent,
GET_ACTIVITIES | GET_META_DATA | GET_RESOLVED_FILTER);