summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErica Chang <echang@cyngn.com>2016-03-16 11:41:43 -0700
committerErica Chang <echang@cyngn.com>2016-04-07 12:05:51 -0700
commit33306c485a3d59cfdae4e26e8a762b0a025fb742 (patch)
tree64dba302e56f79870d2523670c25d88a7ee56ca2
parenta32f6a37b1442633594e7d16b2378d35a7dcecbd (diff)
downloadpackages_apps_Contacts-33306c485a3d59cfdae4e26e8a762b0a025fb742.tar.gz
packages_apps_Contacts-33306c485a3d59cfdae4e26e8a762b0a025fb742.tar.bz2
packages_apps_Contacts-33306c485a3d59cfdae4e26e8a762b0a025fb742.zip
Contacts: fixed contacts filter exception
Contacts filter needs both the account type and account handle to be not empty, added the check in to prevent NPE. Change-Id: I5138f457caa334b22d37d22196a1cfad4a712229
-rw-r--r--src/com/android/contacts/list/PluginContactBrowseListFragment.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/contacts/list/PluginContactBrowseListFragment.java b/src/com/android/contacts/list/PluginContactBrowseListFragment.java
index d5a219f0d..43e975406 100644
--- a/src/com/android/contacts/list/PluginContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/PluginContactBrowseListFragment.java
@@ -729,7 +729,9 @@ public class PluginContactBrowseListFragment extends ContactEntryListFragment<Co
if (mInCallPluginInfo.mCallMethodInfo.mIsAuthenticated && (!TextUtils.equals
(mAccountType, mInCallPluginInfo.mCallMethodInfo.mAccountType) ||
TextUtils.equals(mAccountHandle,
- mInCallPluginInfo.mCallMethodInfo.mAccountHandle))) {
+ mInCallPluginInfo.mCallMethodInfo.mAccountHandle)) &&
+ !TextUtils.isEmpty(mInCallPluginInfo.mCallMethodInfo.mAccountType) &&
+ !TextUtils.isEmpty(mInCallPluginInfo.mCallMethodInfo.mAccountHandle)) {
mAccountType = mInCallPluginInfo.mCallMethodInfo.mAccountType;
mAccountHandle = mInCallPluginInfo.mCallMethodInfo.mAccountHandle;
setFilter(ContactListFilter.createAccountFilter(