diff options
author | keyboardr <keyboardr@google.com> | 2017-06-26 15:16:26 -0700 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2017-06-30 14:33:17 -0700 |
commit | a60579e8f6abff88814d940f9da51e22788d6007 (patch) | |
tree | 188bdb9ec664a2d572efef0f87841958fa966c9d /java/com/android/dialer/app/filterednumber/NumbersAdapter.java | |
parent | 4b499669dde98f485199fd38883ad0dc26d1f0f3 (diff) |
All Fragments are now support library Fragments.
Switch a bunch of imports to support library Fragments (and Loaders) instead of framework Fragments (and Loaders). This was needed to use FragmentManager.isStateSaved() instead of manually tracking that state. This should reduce errors around committing after state is saved.
Also adds METADATA presubmit to prevent new usages of framework Fragments or Loaders.
Bug: 38241305
Test: Covered by existing tests.
PiperOrigin-RevId: 160202511
Change-Id: I5dc0b467da984ca571e49b4dfa0deea44eb372b2
Diffstat (limited to 'java/com/android/dialer/app/filterednumber/NumbersAdapter.java')
-rw-r--r-- | java/com/android/dialer/app/filterednumber/NumbersAdapter.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/java/com/android/dialer/app/filterednumber/NumbersAdapter.java b/java/com/android/dialer/app/filterednumber/NumbersAdapter.java index d98395ec7..800ea2314 100644 --- a/java/com/android/dialer/app/filterednumber/NumbersAdapter.java +++ b/java/com/android/dialer/app/filterednumber/NumbersAdapter.java @@ -15,10 +15,10 @@ */ package com.android.dialer.app.filterednumber; -import android.app.FragmentManager; import android.content.Context; import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds.Phone; +import android.support.v4.app.FragmentManager; import android.text.BidiFormatter; import android.text.TextDirectionHeuristics; import android.text.TextUtils; @@ -57,10 +57,9 @@ public class NumbersAdapter extends SimpleCursorAdapter { } public void updateView(View view, String number, String countryIso) { - final TextView callerName = (TextView) view.findViewById(R.id.caller_name); - final TextView callerNumber = (TextView) view.findViewById(R.id.caller_number); - final QuickContactBadge quickContactBadge = - (QuickContactBadge) view.findViewById(R.id.quick_contact_photo); + final TextView callerName = view.findViewById(R.id.caller_name); + final TextView callerNumber = view.findViewById(R.id.caller_number); + final QuickContactBadge quickContactBadge = view.findViewById(R.id.quick_contact_photo); quickContactBadge.setOverlay(null); if (CompatUtils.hasPrioritizedMimeType()) { quickContactBadge.setPrioritizedMimeType(Phone.CONTENT_ITEM_TYPE); |