diff --git a/res/values/config.xml b/res/values/config.xml
index a52dafcc0f0..e3d8e7dd8ba 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -267,17 +267,32 @@
com.android.settings.intelligence
-
-
- com.android.packageinstaller
-
-
false
+
+
+ com.android.packageinstaller
+
+
+
+
+ com.android.devicelockcontroller
+
+
+
+
+ com.android.soundpicker
+
+
+
+
+ com.android.contacts
+
+
com.android.emergency
diff --git a/src/com/android/settings/notification/app/BubbleCategoryPreferenceController.java b/src/com/android/settings/notification/app/BubbleCategoryPreferenceController.java
index 37baf8b7c38..13c4155595a 100644
--- a/src/com/android/settings/notification/app/BubbleCategoryPreferenceController.java
+++ b/src/com/android/settings/notification/app/BubbleCategoryPreferenceController.java
@@ -56,6 +56,7 @@ public class BubbleCategoryPreferenceController extends NotificationPreferenceCo
if (mAppRow != null) {
final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS);
+ intent.setPackage(mContext.getPackageName());
intent.putExtra(Settings.EXTRA_APP_PACKAGE, mAppRow.pkg);
intent.putExtra(Settings.EXTRA_APP_UID, mAppRow.uid);
preference.setIntent(intent);
diff --git a/src/com/android/settings/notification/app/BubbleLinkPreferenceController.java b/src/com/android/settings/notification/app/BubbleLinkPreferenceController.java
index fcabe9b87af..9d954ce19a7 100644
--- a/src/com/android/settings/notification/app/BubbleLinkPreferenceController.java
+++ b/src/com/android/settings/notification/app/BubbleLinkPreferenceController.java
@@ -56,6 +56,7 @@ public class BubbleLinkPreferenceController extends NotificationPreferenceContro
if (mAppRow != null) {
final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS);
+ intent.setPackage(mContext.getPackageName());
intent.putExtra(Settings.EXTRA_APP_PACKAGE, mAppRow.pkg);
intent.putExtra(Settings.EXTRA_APP_UID, mAppRow.uid);
preference.setIntent(intent);
diff --git a/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java b/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java
index 888bd25c770..8c22f926e9b 100644
--- a/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java
+++ b/src/com/android/settings/notification/app/BubbleSummaryPreferenceController.java
@@ -77,6 +77,7 @@ public class BubbleSummaryPreferenceController extends NotificationPreferenceCon
if (mAppRow != null) {
final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS);
+ intent.setPackage(mContext.getPackageName());
intent.putExtra(Settings.EXTRA_APP_PACKAGE, mAppRow.pkg);
intent.putExtra(Settings.EXTRA_APP_UID, mAppRow.uid);
preference.setIntent(intent);
diff --git a/src/com/android/settings/notification/history/NotificationHistoryAdapter.java b/src/com/android/settings/notification/history/NotificationHistoryAdapter.java
index 96bc14a6fb2..5368f25e76e 100644
--- a/src/com/android/settings/notification/history/NotificationHistoryAdapter.java
+++ b/src/com/android/settings/notification/history/NotificationHistoryAdapter.java
@@ -38,6 +38,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.android.internal.logging.UiEventLogger;
import com.android.settings.R;
+import com.android.settings.Utils;
import java.util.ArrayList;
import java.util.List;
@@ -87,6 +88,7 @@ public class NotificationHistoryAdapter extends
mUiEventLogger.logWithPosition(NotificationHistoryActivity.NotificationHistoryEvent
.NOTIFICATION_HISTORY_OLDER_ITEM_CLICK, hn.getUid(), hn.getPackage(), position);
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
+ .setPackage(Utils.SETTINGS_PACKAGE_NAME)
.putExtra(EXTRA_APP_PACKAGE, hn.getPackage())
.putExtra(EXTRA_CHANNEL_ID, hn.getChannelId())
.putExtra(EXTRA_CONVERSATION_ID, hn.getConversationId());
diff --git a/src/com/android/settings/notification/history/NotificationSbnAdapter.java b/src/com/android/settings/notification/history/NotificationSbnAdapter.java
index c556b55179e..0301d7b7fd5 100644
--- a/src/com/android/settings/notification/history/NotificationSbnAdapter.java
+++ b/src/com/android/settings/notification/history/NotificationSbnAdapter.java
@@ -130,6 +130,7 @@ public class NotificationSbnAdapter extends
mUiEventLogger);
holder.itemView.setOnLongClickListener(v -> {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
+ .setPackage(mContext.getPackageName())
.putExtra(EXTRA_APP_PACKAGE, sbn.getPackageName())
.putExtra(EXTRA_CHANNEL_ID, sbn.getNotification().getChannelId())
.putExtra(EXTRA_CONVERSATION_ID, sbn.getNotification().getShortcutId());
diff --git a/src/com/android/settings/notification/history/NotificationStation.java b/src/com/android/settings/notification/history/NotificationStation.java
index 3b27e1947d2..e79a4ac58c6 100644
--- a/src/com/android/settings/notification/history/NotificationStation.java
+++ b/src/com/android/settings/notification/history/NotificationStation.java
@@ -751,6 +751,7 @@ public class NotificationStation extends SettingsPreferenceFragment {
@Override
public void performClick() {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
+ .setPackage(mContext.getPackageName())
.putExtra(EXTRA_APP_PACKAGE, mInfo.pkg)
.putExtra(EXTRA_CHANNEL_ID,
mInfo.channel != null ? mInfo.channel.getId() : mInfo.channelId);
diff --git a/src/com/android/settings/notification/zen/AbstractZenModeAutomaticRulePreferenceController.java b/src/com/android/settings/notification/zen/AbstractZenModeAutomaticRulePreferenceController.java
index 097d9137985..3a809d077fe 100644
--- a/src/com/android/settings/notification/zen/AbstractZenModeAutomaticRulePreferenceController.java
+++ b/src/com/android/settings/notification/zen/AbstractZenModeAutomaticRulePreferenceController.java
@@ -36,6 +36,7 @@ import android.util.Log;
import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
+import com.android.settings.Utils;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.lifecycle.Lifecycle;
@@ -83,6 +84,7 @@ abstract public class AbstractZenModeAutomaticRulePreferenceController extends
intent.setComponent(configurationActivity);
} else {
intent.setAction(settingsAction);
+ intent.setPackage(Utils.SETTINGS_PACKAGE_NAME);
}
return intent;
}
diff --git a/src/com/android/settings/notification/zen/ZenOnboardingActivity.java b/src/com/android/settings/notification/zen/ZenOnboardingActivity.java
index a6e78eb2068..151341cc4e8 100644
--- a/src/com/android/settings/notification/zen/ZenOnboardingActivity.java
+++ b/src/com/android/settings/notification/zen/ZenOnboardingActivity.java
@@ -116,7 +116,8 @@ public class ZenOnboardingActivity extends Activity {
public void launchSettings(View button) {
mMetrics.action(SettingsEnums.ACTION_ZEN_ONBOARDING_SETTINGS);
- Intent settings = new Intent(Settings.ACTION_ZEN_MODE_SETTINGS);
+ Intent settings = new Intent(Settings.ACTION_ZEN_MODE_SETTINGS)
+ .setPackage(getPackageName());
settings.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(settings);
}
diff --git a/src/com/android/settings/notification/zen/ZenPrioritySendersHelper.java b/src/com/android/settings/notification/zen/ZenPrioritySendersHelper.java
index 5d0b71b7643..1280a221788 100644
--- a/src/com/android/settings/notification/zen/ZenPrioritySendersHelper.java
+++ b/src/com/android/settings/notification/zen/ZenPrioritySendersHelper.java
@@ -95,6 +95,11 @@ public class ZenPrioritySendersHelper {
mNotificationBackend = notificationBackend;
mSelectorClickListener = clickListener;
+ String contactsPackage = context.getString(R.string.config_contacts_package_name);
+ ALL_CONTACTS_INTENT.setPackage(contactsPackage);
+ STARRED_CONTACTS_INTENT.setPackage(contactsPackage);
+ FALLBACK_INTENT.setPackage(contactsPackage);
+
mPackageManager = mContext.getPackageManager();
if (!FALLBACK_INTENT.hasCategory(Intent.CATEGORY_APP_CONTACTS)) {
FALLBACK_INTENT.addCategory(Intent.CATEGORY_APP_CONTACTS);
diff --git a/src/com/android/settings/notification/zen/ZenRuleStarredContactsPreferenceController.java b/src/com/android/settings/notification/zen/ZenRuleStarredContactsPreferenceController.java
index 3ac66337eb4..729c5b95518 100644
--- a/src/com/android/settings/notification/zen/ZenRuleStarredContactsPreferenceController.java
+++ b/src/com/android/settings/notification/zen/ZenRuleStarredContactsPreferenceController.java
@@ -25,6 +25,7 @@ import android.service.notification.ZenPolicy;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
+import com.android.settings.R;
import com.android.settingslib.core.lifecycle.Lifecycle;
public class ZenRuleStarredContactsPreferenceController extends
@@ -43,10 +44,13 @@ public class ZenRuleStarredContactsPreferenceController extends
mPriorityCategory = priorityCategory;
mPackageManager = mContext.getPackageManager();
+ String contactsPackage = context.getString(R.string.config_contacts_package_name);
mStarredContactsIntent = new Intent(Contacts.Intents.UI.LIST_STARRED_ACTION)
+ .setPackage(contactsPackage)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
- mFallbackIntent = new Intent(Intent.ACTION_MAIN);
+ mFallbackIntent = new Intent(Intent.ACTION_MAIN);
+ mFallbackIntent.setPackage(contactsPackage);
mFallbackIntent.addCategory(Intent.CATEGORY_APP_CONTACTS);
mFallbackIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
}
diff --git a/src/com/android/settings/notification/zen/ZenSuggestionActivity.java b/src/com/android/settings/notification/zen/ZenSuggestionActivity.java
index 728b1717f06..b535a3e900e 100644
--- a/src/com/android/settings/notification/zen/ZenSuggestionActivity.java
+++ b/src/com/android/settings/notification/zen/ZenSuggestionActivity.java
@@ -12,11 +12,13 @@ public class ZenSuggestionActivity extends Activity {
super.onCreate(savedInstanceState);
// start up zen settings activity
- Intent settingsIntent = new Intent(Settings.ACTION_ZEN_MODE_SETTINGS);
+ Intent settingsIntent = new Intent(Settings.ACTION_ZEN_MODE_SETTINGS)
+ .setPackage(getPackageName());
startActivity(settingsIntent);
// start up onboarding activity
- Intent onboardingActivity = new Intent(Settings.ZEN_MODE_ONBOARDING);
+ Intent onboardingActivity = new Intent(Settings.ZEN_MODE_ONBOARDING)
+ .setPackage(getPackageName());
startActivity(onboardingActivity);
finish();