Directly go to account sync screen if there's only one account for that type.

Bug: 6629330
Change-Id: Ieb2bad131b1580a6b75d970c9a0ea9980580f66d
This commit is contained in:
Amith Yamasani
2012-06-07 17:03:20 -07:00
parent ffa6f6e3e2
commit 3882c2e215
2 changed files with 37 additions and 12 deletions

View File

@@ -124,4 +124,14 @@ public class AuthenticatorHelper {
public AuthenticatorDescription getAccountTypeDescription(String accountType) {
return mTypeToAuthDescription.get(accountType);
}
public boolean hasAccountPreferences(final String accountType) {
if (containsAccountType(accountType)) {
AuthenticatorDescription desc = getAccountTypeDescription(accountType);
if (desc != null && desc.accountPreferencesId != 0) {
return true;
}
}
return false;
}
}