diff options
author | Gyanesh Mittal <gyaneshm@google.com> | 2023-04-10 20:06:19 +0000 |
---|---|---|
committer | Cherrypicker Worker <android-build-cherrypicker-worker@system.gserviceaccount.com> | 2023-04-10 20:06:19 +0000 |
commit | 55ea26725fdfabee7566d961043b93689f700750 (patch) | |
tree | 2be712b44e118dce91206b77e9b058490fb85852 /src | |
parent | 07597e02c5d7ab55c786ced6e7e5d612c830ced7 (diff) | |
download | Contacts-55ea26725fdfabee7566d961043b93689f700750.tar.gz |
Add Extra Parameter for Intent
Since AccountDashboardActivity has added data category, all callers that used this intent need to set data for its change
Bug: 276974568
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5da78b7aa40215f0b5f916f02f31dde4a7f679fb)
Merged-In: Ieb23fb810a17853158eafd8cf0c8f461e821944b
Change-Id: Ieb23fb810a17853158eafd8cf0c8f461e821944b
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/contacts/util/ImplicitIntentsUtil.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/contacts/util/ImplicitIntentsUtil.java b/src/com/android/contacts/util/ImplicitIntentsUtil.java index a1ab896d0..e1377e06b 100644 --- a/src/com/android/contacts/util/ImplicitIntentsUtil.java +++ b/src/com/android/contacts/util/ImplicitIntentsUtil.java @@ -30,6 +30,8 @@ import android.provider.ContactsContract.QuickContact; import android.provider.Settings; import android.text.TextUtils; +import androidx.core.os.BuildCompat; + import com.android.contacts.logging.ScreenEvent.ScreenType; import com.android.contacts.model.account.GoogleAccountType; import com.android.contacts.quickcontact.QuickContactActivity; @@ -140,6 +142,9 @@ public class ImplicitIntentsUtil { public static Intent getIntentForAddingAccount() { final Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); + if (BuildCompat.isAtLeastU()) { + intent.setData(Uri.fromParts("package", "com.android.contacts", null)); + } intent.putExtra(Settings.EXTRA_AUTHORITIES, new String[]{ContactsContract.AUTHORITY}); return intent; |