From 82d909679639c3b3041868da20af44f4ee2de1f1 Mon Sep 17 00:00:00 2001 From: Tony Mak Date: Wed, 4 May 2016 13:51:41 +0100 Subject: [PATCH] Should forward the intent even if its activity is disabled in Settings This fixes the cross profile intent filter test in CtsVerifier. Activities of action APPLICATION_DEVELOPMENT_SETTINGS and NFC_PAYMENT_SETTINGS are disabled in managed profile. But we still want their corresponding intents to be forwarded to personal side. Bug: 28426865 Change-Id: I65afc06f7faf4532d9e132f44c1faa49f47d1a2e --- src/com/android/settings/ManagedProfileSetup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/ManagedProfileSetup.java b/src/com/android/settings/ManagedProfileSetup.java index 677bdf1d5b1..ac012b06a65 100644 --- a/src/com/android/settings/ManagedProfileSetup.java +++ b/src/com/android/settings/ManagedProfileSetup.java @@ -32,6 +32,7 @@ import java.util.List; import static android.content.pm.PackageManager.GET_ACTIVITIES; import static android.content.pm.PackageManager.GET_META_DATA; import static android.content.pm.PackageManager.GET_RESOLVED_FILTER; +import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS; /** * Listens to {@link Intent.ACTION_BOOT_COMPLETED} and {@link Intent.ACTION_PRE_BOOT_COMPLETED} @@ -63,7 +64,7 @@ public class ManagedProfileSetup extends BroadcastReceiver { // Resolves activities for the managed profile (which we're running as) List resolvedIntents = pm.queryIntentActivities(intent, - GET_ACTIVITIES | GET_META_DATA | GET_RESOLVED_FILTER); + GET_ACTIVITIES | GET_META_DATA | GET_RESOLVED_FILTER | MATCH_DISABLED_COMPONENTS); final int count = resolvedIntents.size(); for (int i = 0; i < count; i++) { ResolveInfo info = resolvedIntents.get(i);