diff options
author | Rohit Yengisetty <rohit@cyngn.com> | 2016-05-18 15:39:22 -0700 |
---|---|---|
committer | Rohit Yengisetty <rohit@cyngn.com> | 2016-05-18 15:39:22 -0700 |
commit | 66374db2f803b0f399473b440022b62eb4db8e9c (patch) | |
tree | 5986b019930f2c3ba325b04e30b1ef273ee654dd | |
parent | 91321bc8216e228b33cda08aceccc4e6281f96e7 (diff) | |
download | packages_apps_Contacts-66374db2f803b0f399473b440022b62eb4db8e9c.tar.gz packages_apps_Contacts-66374db2f803b0f399473b440022b62eb4db8e9c.tar.bz2 packages_apps_Contacts-66374db2f803b0f399473b440022b62eb4db8e9c.zip |
Use the explicit spam flag on Contact for identifying spammy contacts
We were using the spam count as an indicator for determing whether a
contact is spam. Changing this behavior to rely on a caller-info provider
to signal that a contact is spam, rather than determining that ourselves.
A caller-info provider would have the proper domain knowledge to make
this determination, so deferring to them is worthwhile.
Change-Id: If548926b7269e51c0805f5d1ef73edcffbd9e298
Issue-Id: OPO-736
-rw-r--r-- | src/com/android/contacts/quickcontact/QuickContactActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 46762651e..55d12adb3 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -1159,7 +1159,8 @@ public class QuickContactActivity extends ContactsActivity implements setAttributionText(data.getProviderName()); final int spamCount = data.getSpamCount(); - if (spamCount > 0) { + final boolean isSpam = data.isSpam(); + if (isSpam) { mHasComputedThemeColor = true; setThemeColor(mMaterialColorMapUtils .calculatePrimaryAndSecondaryColor(getResources() |