Dismiss import dialog after it's clicked
- The workflow we want to fix is opening account dialog from import dialog.
- Previously, we keep import dialog around until account is chosen; this
workflow never worked well on rotation since Lollipop.
- Now, we dismiss import dialog to simplify the workflow; and since we
dismiss the import dialog, we use activity as a listener.
- SelectAccountDialogFragment is used in:
- import contacts
- create a new group
Bug: 32502787
Test: manual - verify importing contacts and creating new groups
work well after rotation when there's 0, 1, and 2+ accounts.
Change-Id: Ic8b9c3f9987aeb3867ab2100097c235088507bdb
diff --git a/src/com/android/contacts/ContactsDrawerActivity.java b/src/com/android/contacts/ContactsDrawerActivity.java
index 325ecbe..e348a20 100644
--- a/src/com/android/contacts/ContactsDrawerActivity.java
+++ b/src/com/android/contacts/ContactsDrawerActivity.java
@@ -703,9 +703,9 @@
onAccountChosen(accounts.get(0), /* extraArgs */ null);
return;
}
- SelectAccountDialogFragment.show(getFragmentManager(), null,
- R.string.dialog_new_group_account, AccountListFilter.ACCOUNTS_GROUP_WRITABLE,
- /* extraArgs */ null, TAG_SELECT_ACCOUNT_DIALOG);
+ SelectAccountDialogFragment.show(getFragmentManager(), R.string.dialog_new_group_account,
+ AccountListFilter.ACCOUNTS_GROUP_WRITABLE, /* extraArgs */ null,
+ TAG_SELECT_ACCOUNT_DIALOG);
}
@Override