summaryrefslogtreecommitdiff
path: root/src/com/android/contacts/util
diff options
context:
space:
mode:
authorMarcus Hagerott <mhagerott@google.com>2016-12-22 11:09:52 -0800
committerMarcus Hagerott <mhagerott@google.com>2017-01-04 08:10:42 -0800
commit107cd7a225eccad56dfe12ca6d32908e651b27ac (patch)
tree46f829a47cbba3421faa296729809c8902d9863d /src/com/android/contacts/util
parentee3d3a503553de2699285d98bc6fe7d34699a8b0 (diff)
downloadContacts-107cd7a225eccad56dfe12ca6d32908e651b27ac.tar.gz
Replace getAccounts method with blockForWritableAccounts
This makes it more explicit that the method may block and should be avoided. Test: ran GoogleContactsTests Bug 33627801 Change-Id: Idaffc3f0f6c986e21701f661d46b39ee8cbcc0a1
Diffstat (limited to 'src/com/android/contacts/util')
-rw-r--r--src/com/android/contacts/util/AccountSelectionUtil.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/com/android/contacts/util/AccountSelectionUtil.java b/src/com/android/contacts/util/AccountSelectionUtil.java
index a29af9ac3..bfe8a08b3 100644
--- a/src/com/android/contacts/util/AccountSelectionUtil.java
+++ b/src/com/android/contacts/util/AccountSelectionUtil.java
@@ -84,15 +84,6 @@ public class AccountSelectionUtil {
}
}
- public static Dialog getSelectAccountDialog(Activity activity, int resId) {
- return getSelectAccountDialog(activity, resId, null, null);
- }
-
- public static Dialog getSelectAccountDialog(Activity activity, int resId,
- DialogInterface.OnClickListener onClickListener) {
- return getSelectAccountDialog(activity, resId, onClickListener, null);
- }
-
/**
* When OnClickListener or OnCancelListener is null, uses a default listener.
* The default OnCancelListener just closes itself with {@link Dialog#dismiss()}.
@@ -101,7 +92,8 @@ public class AccountSelectionUtil {
DialogInterface.OnClickListener onClickListener,
DialogInterface.OnCancelListener onCancelListener) {
final AccountTypeManager accountTypes = AccountTypeManager.getInstance(activity);
- final List<AccountWithDataSet> writableAccountList = accountTypes.getAccounts(true);
+ final List<AccountWithDataSet> writableAccountList =
+ accountTypes.blockForWritableAccounts();
Log.i(LOG_TAG, "The number of available accounts: " + writableAccountList.size());