diff options
| author | emancebo <emancebo@cyngn.com> | 2015-03-27 10:38:23 -0700 |
|---|---|---|
| committer | emancebo <emancebo@cyngn.com> | 2015-03-27 10:38:23 -0700 |
| commit | 6eb9ddafe2cdcfb9352d4eba128788fe6549b76f (patch) | |
| tree | c22031341187815aa1bba1db0a6ccd7d94fe2771 | |
| parent | 204600a31500659ff7fab77a88e1b95fd10c8d65 (diff) | |
| download | packages_apps_ContactsCommon-6eb9ddafe2cdcfb9352d4eba128788fe6549b76f.tar.gz packages_apps_ContactsCommon-6eb9ddafe2cdcfb9352d4eba128788fe6549b76f.tar.bz2 packages_apps_ContactsCommon-6eb9ddafe2cdcfb9352d4eba128788fe6549b76f.zip | |
Only check for valid SIM on SIM accounts
We are filtering out all remote accounts if the account name does not match the SIM name.
Only do this check for SIM accounts.
Change-Id: Ic08d8f0b82d3ab59226e5b9085a72a203cc7ab1f
| -rw-r--r-- | src/com/android/contacts/common/model/AccountTypeManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/model/AccountTypeManager.java b/src/com/android/contacts/common/model/AccountTypeManager.java index 0aa2f4c2..7b5d8071 100644 --- a/src/com/android/contacts/common/model/AccountTypeManager.java +++ b/src/com/android/contacts/common/model/AccountTypeManager.java @@ -643,6 +643,12 @@ class AccountTypeManagerImpl extends AccountTypeManager } private boolean isSimAccountInvalid(Account account) { + // skip this check if this is not a sim account + if (MoreContactUtils.getSubscription(account.type, account.name) + == SimContactsConstants.SUB_INVALID) { + return false; + } + if (MSimTelephonyManager.getDefault().isMultiSimEnabled()) { if (account.name.equals(SimContactsConstants.SIM_NAME)) return true; |
