diff options
| author | Danny Baumann <dannybaumann@web.de> | 2013-10-04 09:04:28 +0200 |
|---|---|---|
| committer | Danny Baumann <dannybaumann@web.de> | 2013-10-04 09:06:16 +0200 |
| commit | f6cead9ebee24fdfa12db93bebda8fcd0284913d (patch) | |
| tree | d808453a8cd56582bf964a6856d17aff6a4d6f98 | |
| parent | 77ae8358d4a098c0d8695be77d2c52b1a56a0c36 (diff) | |
| download | android_packages_apps_ContactsCommon-f6cead9ebee24fdfa12db93bebda8fcd0284913d.tar.gz android_packages_apps_ContactsCommon-f6cead9ebee24fdfa12db93bebda8fcd0284913d.tar.bz2 android_packages_apps_ContactsCommon-f6cead9ebee24fdfa12db93bebda8fcd0284913d.zip | |
Revert "[2/2] Allow hiding frequently contacted lists"
This reverts commit 77ae8358d4a098c0d8695be77d2c52b1a56a0c36.
It hides the 'frequently contacted' list in the dialer unconditionally,
shouldn't be enabled by default anyway and is a questionable feature in
itself.
Change-Id: I39f8ac681f870ca8fd85ceb19073f54f766b2e1e
| -rw-r--r-- | src/com/android/contacts/common/list/ContactTileAdapter.java | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/com/android/contacts/common/list/ContactTileAdapter.java b/src/com/android/contacts/common/list/ContactTileAdapter.java index f4001446..557ebff6 100644 --- a/src/com/android/contacts/common/list/ContactTileAdapter.java +++ b/src/com/android/contacts/common/list/ContactTileAdapter.java @@ -27,8 +27,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.FrameLayout; -import android.preference.PreferenceManager; -import android.content.SharedPreferences; import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactPresenceIconUtil; @@ -293,21 +291,11 @@ public class ContactTileAdapter extends BaseAdapter { return contact; } - private boolean hideFrequents() { - return PreferenceManager - .getDefaultSharedPreferences(mContext) - .getBoolean("hideFrequents", true); - } - /** * Returns the number of frequents that will be displayed in the list. */ public int getNumFrequents() { - if (hideFrequents()) { - return 0; - } else { - return mNumFrequents; - } + return mNumFrequents; } @Override @@ -316,8 +304,6 @@ public class ContactTileAdapter extends BaseAdapter { return 0; } - boolean hiddenFrequents = hideFrequents(); - switch (mDisplayType) { case STARRED_ONLY: return getRowCount(mContactCursor.getCount()); @@ -326,23 +312,15 @@ public class ContactTileAdapter extends BaseAdapter { // Takes numbers of rows the Starred Contacts Occupy int starredRowCount = getRowCount(mDividerPosition); - if (hiddenFrequents) { - return starredRowCount; - } else { - // Compute the frequent row count which is 1 plus the number of frequents - // (to account for the divider) or 0 if there are no frequents. - int frequentRowCount = mNumFrequents == 0 ? 0 : mNumFrequents + 1; + // Compute the frequent row count which is 1 plus the number of frequents + // (to account for the divider) or 0 if there are no frequents. + int frequentRowCount = mNumFrequents == 0 ? 0 : mNumFrequents + 1; - // Return the number of starred plus frequent rows - return starredRowCount + frequentRowCount; - } + // Return the number of starred plus frequent rows + return starredRowCount + frequentRowCount; case FREQUENT_ONLY: - if (hiddenFrequents) { - return 0; - } else { - // Number of frequent contacts - return mContactCursor.getCount(); - } + // Number of frequent contacts + return mContactCursor.getCount(); default: throw new IllegalArgumentException("Unrecognized DisplayType " + mDisplayType); } |
