From 20f7f275f373c0637f53064903b66aaef4b0dc0b Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Wed, 4 Oct 2017 17:02:42 -0700 Subject: FAB now properly scales in multiwindowed mode. As per the material desing spec [1], floating action buttons should be 56dp in size normally and 40dp on small displays (like in multiwindow mode) while always maintaing a 24dp image size. screenshot (mw): http://screen/URJrg1WoQfn screenshot (normal): http://screen/TUU65D1sSHp [1] https://material.io/guidelines/components/buttons-floating-action-button.html#buttons-floating-action-button-floating-action-button Bug: 67312080 Test: n/a PiperOrigin-RevId: 171086404 Change-Id: Ib213cf3c94dbb0f0df5b21f23f3022a8f53d80a8 --- java/com/android/dialer/app/res/layout/dialtacts_activity.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'java') diff --git a/java/com/android/dialer/app/res/layout/dialtacts_activity.xml b/java/com/android/dialer/app/res/layout/dialtacts_activity.xml index 4c07f1c9e..1627844d6 100644 --- a/java/com/android/dialer/app/res/layout/dialtacts_activity.xml +++ b/java/com/android/dialer/app/res/layout/dialtacts_activity.xml @@ -41,13 +41,12 @@ -- cgit v1.2.3 From 71216ca5347800ffa2fefc1869bcedbee6e35a6b Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Wed, 4 Oct 2017 17:08:27 -0700 Subject: No longer close cursors manually after onLoadFinished is called. Documentation clearly states that cursor loaders will close all cursors for you. This CL removes all calls to cursor.close() after onLoaderFinished is called. Bug: 66902052 Test: n/a PiperOrigin-RevId: 171087171 Change-Id: If771fbea52e03ffdd3652af2699c393cc7424de3 --- .../searchfragment/list/SearchCursorManager.java | 29 +++------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'java') 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; } /** -- cgit v1.2.3