Add new task to intents that leave Settings

Test: manual
Fixes: 197702721
Fixes: 197704633
Fixes: 197704125
Fixes: 197704456
Change-Id: Iffeca2d152bd083edafe69a7121d011e284eeb69
This commit is contained in:
Julia Reynolds
2021-08-30 09:37:12 -04:00
parent 2401ec4235
commit 76aedd72f0
2 changed files with 9 additions and 4 deletions

View File

@@ -54,10 +54,13 @@ public class ZenModePrioritySendersPreferenceController
@VisibleForTesting static final String KEY_NONE = "senders_none";
private static final Intent ALL_CONTACTS_INTENT =
new Intent(Contacts.Intents.UI.LIST_DEFAULT);
new Intent(Contacts.Intents.UI.LIST_DEFAULT)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
private static final Intent STARRED_CONTACTS_INTENT =
new Intent(Contacts.Intents.UI.LIST_STARRED_ACTION);
private static final Intent FALLBACK_INTENT = new Intent(Intent.ACTION_MAIN);
new Intent(Contacts.Intents.UI.LIST_STARRED_ACTION)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
private static final Intent FALLBACK_INTENT = new Intent(Intent.ACTION_MAIN)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
private final PackageManager mPackageManager;
private final boolean mIsMessages; // if this is false, then this preference is for calls

View File

@@ -43,10 +43,12 @@ public class ZenRuleStarredContactsPreferenceController extends
mPriorityCategory = priorityCategory;
mPackageManager = mContext.getPackageManager();
mStarredContactsIntent = new Intent(Contacts.Intents.UI.LIST_STARRED_ACTION);
mStarredContactsIntent = new Intent(Contacts.Intents.UI.LIST_STARRED_ACTION)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
mFallbackIntent = new Intent(Intent.ACTION_MAIN);
mFallbackIntent.addCategory(Intent.CATEGORY_APP_CONTACTS);
mFallbackIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
}
@Override