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/contacts/common/list | |
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/contacts/common/list')
6 files changed, 10 insertions, 10 deletions
diff --git a/java/com/android/contacts/common/list/ContactEntryListAdapter.java b/java/com/android/contacts/common/list/ContactEntryListAdapter.java index 7335297e0..19e43d81e 100644 --- a/java/com/android/contacts/common/list/ContactEntryListAdapter.java +++ b/java/com/android/contacts/common/list/ContactEntryListAdapter.java @@ -16,7 +16,6 @@ package com.android.contacts.common.list; import android.content.Context; -import android.content.CursorLoader; import android.content.res.Resources; import android.database.Cursor; import android.net.Uri; @@ -25,6 +24,7 @@ import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Directory; +import android.support.v4.content.CursorLoader; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; diff --git a/java/com/android/contacts/common/list/ContactEntryListFragment.java b/java/com/android/contacts/common/list/ContactEntryListFragment.java index 04658be89..d39c5af5c 100644 --- a/java/com/android/contacts/common/list/ContactEntryListFragment.java +++ b/java/com/android/contacts/common/list/ContactEntryListFragment.java @@ -16,12 +16,7 @@ package com.android.contacts.common.list; -import android.app.Fragment; -import android.app.LoaderManager; -import android.app.LoaderManager.LoaderCallbacks; import android.content.Context; -import android.content.CursorLoader; -import android.content.Loader; import android.database.Cursor; import android.os.Bundle; import android.os.Handler; @@ -29,6 +24,11 @@ import android.os.Message; import android.os.Parcelable; import android.provider.ContactsContract.Directory; import android.support.annotation.Nullable; +import android.support.v4.app.Fragment; +import android.support.v4.app.LoaderManager; +import android.support.v4.app.LoaderManager.LoaderCallbacks; +import android.support.v4.content.CursorLoader; +import android.support.v4.content.Loader; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.MotionEvent; diff --git a/java/com/android/contacts/common/list/DefaultContactListAdapter.java b/java/com/android/contacts/common/list/DefaultContactListAdapter.java index 7bcae0e0e..115434e18 100644 --- a/java/com/android/contacts/common/list/DefaultContactListAdapter.java +++ b/java/com/android/contacts/common/list/DefaultContactListAdapter.java @@ -16,7 +16,6 @@ package com.android.contacts.common.list; import android.content.Context; -import android.content.CursorLoader; import android.content.SharedPreferences; import android.database.Cursor; import android.net.Uri; @@ -26,6 +25,7 @@ import android.provider.ContactsContract; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Directory; import android.provider.ContactsContract.SearchSnippets; +import android.support.v4.content.CursorLoader; import android.text.TextUtils; import android.view.View; import com.android.contacts.common.compat.ContactsCompat; diff --git a/java/com/android/contacts/common/list/DirectoryListLoader.java b/java/com/android/contacts/common/list/DirectoryListLoader.java index be62cc7a8..89c6b2f4c 100644 --- a/java/com/android/contacts/common/list/DirectoryListLoader.java +++ b/java/com/android/contacts/common/list/DirectoryListLoader.java @@ -15,7 +15,6 @@ */ package com.android.contacts.common.list; -import android.content.AsyncTaskLoader; import android.content.Context; import android.content.pm.PackageManager; import android.database.ContentObserver; @@ -24,6 +23,7 @@ import android.database.MatrixCursor; import android.net.Uri; import android.os.Handler; import android.provider.ContactsContract.Directory; +import android.support.v4.content.AsyncTaskLoader; import android.text.TextUtils; import com.android.contacts.common.R; import com.android.contacts.common.compat.DirectoryCompat; diff --git a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java index d1118c3c7..395024708 100644 --- a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java +++ b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java @@ -17,7 +17,6 @@ package com.android.contacts.common.list; import android.content.Context; -import android.content.CursorLoader; import android.database.Cursor; import android.net.Uri; import android.net.Uri.Builder; @@ -27,6 +26,7 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.SipAddress; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Directory; +import android.support.v4.content.CursorLoader; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; diff --git a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java index 558f3b209..e9083ae78 100644 --- a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java +++ b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java @@ -17,11 +17,11 @@ package com.android.contacts.common.list; import android.content.ComponentName; import android.content.Intent; -import android.content.Loader; import android.database.Cursor; import android.os.Bundle; import android.support.annotation.MainThread; import android.support.annotation.Nullable; +import android.support.v4.content.Loader; import android.text.TextUtils; import android.util.ArraySet; import android.view.LayoutInflater; |