diff options
author | Nicholas Sauer <nicksauer@google.com> | 2017-07-24 07:41:06 -0700 |
---|---|---|
committer | Nicholas Sauer <nicksauer@google.com> | 2017-07-24 16:42:59 +0000 |
commit | 032560017404fd778dfb8a72674eb5e9fd35332f (patch) | |
tree | bc1bac5cfc91a5c02e96ac7f49f501d8b463341f | |
parent | 6148c31a0a666604a8a2a6e638dee3bda1554148 (diff) | |
download | Contacts-032560017404fd778dfb8a72674eb5e9fd35332f.tar.gz |
Check for null results from getTypeForAccount.
bug: 63816624
Test: make Contacts and install. No crash.
Change-Id: Ic4f00413d196ff783d033740e0efb1c82c10e361
(cherry picked from commit d9ecda94ff66021247bde802757353b20ee6b7c8)
-rw-r--r-- | src/com/android/contacts/model/AccountTypeManager.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/contacts/model/AccountTypeManager.java b/src/com/android/contacts/model/AccountTypeManager.java index b442e4f34..993869509 100644 --- a/src/com/android/contacts/model/AccountTypeManager.java +++ b/src/com/android/contacts/model/AccountTypeManager.java @@ -622,9 +622,10 @@ class AccountTypeManagerImpl extends AccountTypeManager final AccountWithDataSet accountWithDataSet = new AccountWithDataSet( account.name, account.type, null); final AccountType type = mTypeProvider.getTypeForAccount(accountWithDataSet); - - // Accounts with a dataSet (e.g. Google plus accounts) are not writable. - result.add(type.wrapAccount(mContext, accountWithDataSet)); + if (type != null) { + // Accounts with a dataSet (e.g. Google plus accounts) are not writable. + result.add(type.wrapAccount(mContext, accountWithDataSet)); + } } return result; } |