diff options
author | Wenyi Wang <wenyiw@google.com> | 2015-11-24 15:31:41 -0800 |
---|---|---|
committer | Wenyi Wang <wenyiw@google.com> | 2015-11-30 09:55:21 -0800 |
commit | 8005ef13459021aaf1ef0f9ed545fb714df4bfc5 (patch) | |
tree | 322040137febfb84a1f679a99519cc6da5c36fda /src/com/android/dialer/list/AllContactsFragment.java | |
parent | a31f24c1ace1ed10b87daa8d23af58e6598fa075 (diff) |
Avoid using prioritized mimetype on pre-M SDKs
Restores code deleted in ag/643285 because the code was used on pre-M.
Bug:25629359
Change-Id: Ief60d301fd8d3c018ce03388c56264a2db727224
Diffstat (limited to 'src/com/android/dialer/list/AllContactsFragment.java')
-rw-r--r-- | src/com/android/dialer/list/AllContactsFragment.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/dialer/list/AllContactsFragment.java b/src/com/android/dialer/list/AllContactsFragment.java index 6ed1fbbbd..7e76279d9 100644 --- a/src/com/android/dialer/list/AllContactsFragment.java +++ b/src/com/android/dialer/list/AllContactsFragment.java @@ -34,6 +34,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; +import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.common.list.ContactEntryListAdapter; import com.android.contacts.common.list.ContactEntryListFragment; import com.android.contacts.common.list.ContactListFilter; @@ -152,8 +153,13 @@ public class AllContactsFragment extends ContactEntryListFragment<ContactEntryLi public void onItemClick(AdapterView<?> parent, View view, int position, long id) { final Uri uri = (Uri) view.getTag(); if (uri != null) { - QuickContact.showQuickContact(getContext(), view, uri, null, - Phone.CONTENT_ITEM_TYPE); + if (CompatUtils.hasPrioritizedMimeType()) { + QuickContact.showQuickContact(getContext(), view, uri, null, + Phone.CONTENT_ITEM_TYPE); + } else { + QuickContact.showQuickContact(getActivity(), view, uri, QuickContact.MODE_LARGE, + null); + } } } |