diff options
author | calderwoodra <calderwoodra@google.com> | 2017-08-08 00:31:05 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-09 17:32:17 -0700 |
commit | 039fc5fdfdca26aa2edcb38be45362a98110f4c8 (patch) | |
tree | 94cbfe493c63660e45605002d22cdc4da6f2ef44 /java/com | |
parent | 9fa921468cc23d6eca0a0c4e6a80fb548265801b (diff) |
New Search Fragment no longer crashes when the device is rotated.
In the new search fragment, if you rotated the device, a crash would occur
because we were prematurly closing the cursors on our own. Since the cursors
are managed by CursorLoaders, we don't actually need to close the cursors
ourselves and can leave that to the framework.
Bug: 37209462
Test: SearchFragmentIntegrationTest
PiperOrigin-RevId: 164562508
Change-Id: Id33274ccb23d026dab352e754a5f03ab834d9d14
Diffstat (limited to 'java/com')
-rw-r--r-- | java/com/android/dialer/searchfragment/list/NewSearchFragment.java | 3 | ||||
-rw-r--r-- | java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java index dff6c7282..70358bb16 100644 --- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java +++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java @@ -152,9 +152,6 @@ public final class NewSearchFragment extends Fragment @Override public void onDestroy() { super.onDestroy(); - // close adapters - adapter.setNearbyPlacesCursor(null); - adapter.setContactsCursor(null); ThreadUtil.getUiThreadHandler().removeCallbacks(loadNearbyPlacesRunnable); } diff --git a/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml b/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml index 06c266082..07113c044 100644 --- a/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml +++ b/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml @@ -16,7 +16,7 @@ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_height="match_parent" + android:layout_height="match_parent" android:layout_width="match_parent"> <android.support.v7.widget.RecyclerView |