From 5dd30438fd3e4384b57cef3c7606ec20fad9b50d Mon Sep 17 00:00:00 2001 From: zachh Date: Thu, 11 Jan 2018 13:43:45 -0800 Subject: Minor polish and bugfixes for new call log. -Reuse the adapter in NewCallLogFragment to maintain position in call log when returning from call details -Convert empty values to null when invoking ContactPhotoManager to make photos appear correctly in new call log bottom sheets -Added CallLogContactTypes to be shared between proper call log and bottom sheets -Fixed vertical alignment in bottom sheet when there was no secondary text -Added some verbose logging Test: unit and manual PiperOrigin-RevId: 181655715 Change-Id: I9c1a42ad8d529ee2327e15fcc1d32b7b83982014 --- .../dialer/contactactions/ContactActionBottomSheet.java | 4 ++-- .../dialer/contactactions/res/layout/contact_layout.xml | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'java/com/android/dialer/contactactions') diff --git a/java/com/android/dialer/contactactions/ContactActionBottomSheet.java b/java/com/android/dialer/contactactions/ContactActionBottomSheet.java index f2f1d189b..7e216aaa1 100644 --- a/java/com/android/dialer/contactactions/ContactActionBottomSheet.java +++ b/java/com/android/dialer/contactactions/ContactActionBottomSheet.java @@ -89,9 +89,9 @@ public class ContactActionBottomSheet extends BottomSheetDialog implements OnCli ContactPhotoManager.getInstance(getContext()) .loadDialerThumbnailOrPhoto( contactView.findViewById(R.id.quick_contact_photo), - photoInfo.lookupUri() != null ? Uri.parse(photoInfo.lookupUri()) : null, + !TextUtils.isEmpty(photoInfo.lookupUri()) ? Uri.parse(photoInfo.lookupUri()) : null, photoInfo.photoId(), - photoInfo.photoUri() != null ? Uri.parse(photoInfo.photoUri()) : null, + !TextUtils.isEmpty(photoInfo.photoUri()) ? Uri.parse(photoInfo.photoUri()) : null, photoInfo.displayName(), photoInfo.contactType()); diff --git a/java/com/android/dialer/contactactions/res/layout/contact_layout.xml b/java/com/android/dialer/contactactions/res/layout/contact_layout.xml index 8ea05d4d6..4deef3e07 100644 --- a/java/com/android/dialer/contactactions/res/layout/contact_layout.xml +++ b/java/com/android/dialer/contactactions/res/layout/contact_layout.xml @@ -15,12 +15,13 @@ ~ limitations under the License --> + android:layout_marginEnd="8dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + android:gravity="center_vertical" + android:orientation="vertical"> + android:layout_height="wrap_content"/> + android:layout_marginTop="2dp"/> \ No newline at end of file -- cgit v1.2.3