diff options
author | twyen <twyen@google.com> | 2017-11-28 11:46:43 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-11-29 11:47:24 -0800 |
commit | dc38c541669ceaa1c1bc1efc45772f3869f1ccda (patch) | |
tree | 87061813e836d2d612f0d53f402442cb47afe2df /java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java | |
parent | 9264b26505607dee9307c378fdd390c985d6be6c (diff) |
Fix resource not found when placing call outside dialer
newInstance() defaults setDefaultResId to 0 and if it is written into the args the real default ID will not be used.
Bug: 69804734
Test: SelectPhoneAccountDialogFragmentTest
PiperOrigin-RevId: 177194281
Change-Id: Ic2b50fa741d812fd464d5e81199b040ef4c07195
Diffstat (limited to 'java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java')
-rw-r--r-- | java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java index 3c9d9268f..e41a75b22 100644 --- a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java +++ b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java @@ -115,7 +115,9 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment { final Bundle args = new Bundle(); args.putInt(ARG_TITLE_RES_ID, titleResId); args.putBoolean(ARG_CAN_SET_DEFAULT, canSetDefault); - args.putInt(ARG_SET_DEFAULT_RES_ID, setDefaultResId); + if (setDefaultResId != 0) { + args.putInt(ARG_SET_DEFAULT_RES_ID, setDefaultResId); + } args.putParcelableArrayList(ARG_ACCOUNT_HANDLES, accountHandlesCopy); args.putParcelable(ARG_LISTENER, listener); args.putString(ARG_CALL_ID, callId); |