diff options
author | Eric Erfanian <erfanian@google.com> | 2018-04-27 15:32:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-04-27 15:32:24 +0000 |
commit | c28ed7444c25d52fd3996f8edf076a1d740d4e05 (patch) | |
tree | 78f3eaa9f7fcd5ff7cdd5cead74b651d3636e618 /java/com/android/dialer/historyitemactions | |
parent | 52a161148b057ebd4b0c86228b82cba305f1102d (diff) | |
parent | e7d83218d752f677c859a6c88181d24dc36a8c83 (diff) |
Merge changes I706802c0,I59f9b334,Ica9301f4,I78e0e0fc,I1d574287, ...
* changes:
Show Cequint info in the new call log.
Implement CequintPhoneLookup
Fix impression logging for spam blocking promo dialog shown in after call notification.
Build out the bottom sheet for suggested contacts in Speed Dial.
Fix bug that title of RTT call is not centered.
Add advisory text to RTT call about transcript storage.
Diffstat (limited to 'java/com/android/dialer/historyitemactions')
3 files changed, 13 insertions, 1 deletions
diff --git a/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java b/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java index 79205a7d9..28663c17d 100644 --- a/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java +++ b/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java @@ -17,8 +17,10 @@ package com.android.dialer.historyitemactions; import android.content.Context; +import android.content.res.ColorStateList; import android.os.Bundle; import android.support.design.widget.BottomSheetDialog; +import android.support.v4.content.ContextCompat; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -109,6 +111,12 @@ public class HistoryItemActionBottomSheet extends BottomSheetDialog implements O ((TextView) moduleView.findViewById(R.id.module_text)).setText(module.getStringId()); ((ImageView) moduleView.findViewById(R.id.module_image)) .setImageResource(module.getDrawableId()); + if (module.tintDrawable()) { + ((ImageView) moduleView.findViewById(R.id.module_image)) + .setImageTintList( + ColorStateList.valueOf( + ContextCompat.getColor(getContext(), R.color.secondary_text_color))); + } moduleView.setOnClickListener(this); moduleView.setTag(module); return moduleView; diff --git a/java/com/android/dialer/historyitemactions/HistoryItemActionModule.java b/java/com/android/dialer/historyitemactions/HistoryItemActionModule.java index d64cbca53..e948924d7 100644 --- a/java/com/android/dialer/historyitemactions/HistoryItemActionModule.java +++ b/java/com/android/dialer/historyitemactions/HistoryItemActionModule.java @@ -32,6 +32,11 @@ public interface HistoryItemActionModule { @DrawableRes int getDrawableId(); + /** Returns true if tint can be applied to the drawable. */ + default boolean tintDrawable() { + return true; + } + /** @return true if the bottom sheet should close, false otherwise */ boolean onClick(); } diff --git a/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml b/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml index 9aee67937..063051947 100644 --- a/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml +++ b/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml @@ -28,7 +28,6 @@ android:layout_height="@dimen/contact_actions_image_size" android:layout_marginStart="@dimen/contact_actions_image_margin" android:layout_marginEnd="@dimen/contact_actions_image_margin" - android:tint="@color/dialer_secondary_text_color" android:scaleType="center"/> <TextView |