diff options
Diffstat (limited to 'java/com/android/dialer/searchfragment/list')
-rw-r--r-- | java/com/android/dialer/searchfragment/list/SearchCursorManager.java | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/java/com/android/dialer/searchfragment/list/SearchCursorManager.java b/java/com/android/dialer/searchfragment/list/SearchCursorManager.java index c6aca8e68..364e97b8c 100644 --- a/java/com/android/dialer/searchfragment/list/SearchCursorManager.java +++ b/java/com/android/dialer/searchfragment/list/SearchCursorManager.java @@ -101,10 +101,6 @@ public final class SearchCursorManager { return false; } - if (contactsCursor != null && !contactsCursor.isClosed()) { - contactsCursor.close(); - } - if (cursor != null) { contactsCursor = cursor; } else { @@ -119,10 +115,6 @@ public final class SearchCursorManager { return false; } - if (nearbyPlacesCursor != null && !nearbyPlacesCursor.isClosed()) { - nearbyPlacesCursor.close(); - } - if (cursor != null) { nearbyPlacesCursor = cursor; } else { @@ -146,10 +138,6 @@ public final class SearchCursorManager { return false; } - if (corpDirectoryCursor != null && !corpDirectoryCursor.isClosed()) { - corpDirectoryCursor.close(); - } - if (cursor != null) { corpDirectoryCursor = cursor; } else { @@ -286,20 +274,9 @@ public final class SearchCursorManager { /** removes all cursors. */ void clear() { - if (contactsCursor != null) { - contactsCursor.close(); - contactsCursor = null; - } - - if (nearbyPlacesCursor != null) { - nearbyPlacesCursor.close(); - nearbyPlacesCursor = null; - } - - if (corpDirectoryCursor != null) { - corpDirectoryCursor.close(); - corpDirectoryCursor = null; - } + contactsCursor = null; + nearbyPlacesCursor = null; + corpDirectoryCursor = null; } /** |