diff options
author | Amith Yamasani <yamasani@google.com> | 2012-06-07 17:03:20 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-06-07 17:03:20 -0700 |
commit | 3882c2e215169ac021c47538e2058ca8089d426f (patch) | |
tree | 237a4a94489cae69b2a312c916d02cc39e1b9d6c /src/com/android/settings/accounts | |
parent | ffa6f6e3e260dad0e7f75f6e8daa892eeed8df92 (diff) | |
download | packages_apps_settings-3882c2e215169ac021c47538e2058ca8089d426f.zip packages_apps_settings-3882c2e215169ac021c47538e2058ca8089d426f.tar.gz packages_apps_settings-3882c2e215169ac021c47538e2058ca8089d426f.tar.bz2 |
Directly go to account sync screen if there's only one account for that type.
Bug: 6629330
Change-Id: Ieb2bad131b1580a6b75d970c9a0ea9980580f66d
Diffstat (limited to 'src/com/android/settings/accounts')
-rw-r--r-- | src/com/android/settings/accounts/AuthenticatorHelper.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/settings/accounts/AuthenticatorHelper.java b/src/com/android/settings/accounts/AuthenticatorHelper.java index 9c17a36..ab2fe74 100644 --- a/src/com/android/settings/accounts/AuthenticatorHelper.java +++ b/src/com/android/settings/accounts/AuthenticatorHelper.java @@ -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; + } } |