diff options
author | calderwoodra <calderwoodra@google.com> | 2018-05-19 00:05:02 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-21 13:17:30 -0700 |
commit | 929539eb864822d669265b142bdcc49b6cf8ea6b (patch) | |
tree | fcaef3fac4068e3669ca5916f7a743d0d5e41bbb /java/com/android/dialer/calllogutils | |
parent | ea7399a7c0c8a3832a6592aee0a0372c300b11f5 (diff) |
Implement a global theme to be easily configured in Dialer.
deleted several colors and unified them across the app
migrated several alert dialogs to support alert dialogs
added many todos
migrated several tests from GoogleRobolectricTestRunner to RobolectricTestRunner
Because of the test migration:
- moved dialpad theme attributes into dialpad/theme
- moved incall ui theme attributes into incallui/theme
Bug: 79883035
Test: tap
PiperOrigin-RevId: 197246477
Change-Id: Ifc534793bc32757bbbf2007a7c40287c8d0817ad
Diffstat (limited to 'java/com/android/dialer/calllogutils')
-rw-r--r-- | java/com/android/dialer/calllogutils/CallTypeIconsView.java | 16 | ||||
-rw-r--r-- | java/com/android/dialer/calllogutils/res/values/colors.xml | 2 |
2 files changed, 8 insertions, 10 deletions
diff --git a/java/com/android/dialer/calllogutils/CallTypeIconsView.java b/java/com/android/dialer/calllogutils/CallTypeIconsView.java index d8c7889ee..30d9b6178 100644 --- a/java/com/android/dialer/calllogutils/CallTypeIconsView.java +++ b/java/com/android/dialer/calllogutils/CallTypeIconsView.java @@ -27,6 +27,7 @@ import android.support.annotation.VisibleForTesting; import android.util.AttributeSet; import android.view.View; import com.android.dialer.compat.AppCompatConstants; +import com.android.dialer.theme.ThemeUtil; import java.util.ArrayList; import java.util.List; @@ -306,38 +307,37 @@ public class CallTypeIconsView extends View { iconId = R.drawable.quantum_ic_voicemail_white_24; drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); voicemail = drawable.mutate(); - voicemail.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY); + voicemail.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_block_white_24; drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); blocked = drawable.mutate(); - blocked.setColorFilter(r.getColor(R.color.blocked_call), PorterDuff.Mode.MULTIPLY); + blocked.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_videocam_vd_white_24; drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); videoCall = drawable.mutate(); - videoCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY); + videoCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_hd_white_24; drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); hdCall = drawable.mutate(); - hdCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY); + hdCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_signal_wifi_4_bar_white_24; drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); wifiCall = drawable.mutate(); - wifiCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY); + wifiCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_language_white_24; drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId); assistedDialedCall = drawable.mutate(); - assistedDialedCall.setColorFilter( - r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY); + assistedDialedCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY); iconId = R.drawable.quantum_ic_rtt_vd_theme_24; drawable = largeIcons ? r.getDrawable(iconId, null) : getScaledBitmap(context, iconId); rttCall = drawable.mutate(); - rttCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY); + rttCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY); iconMargin = largeIcons ? 0 : r.getDimensionPixelSize(R.dimen.call_log_icon_margin); } diff --git a/java/com/android/dialer/calllogutils/res/values/colors.xml b/java/com/android/dialer/calllogutils/res/values/colors.xml index e0e6fb2a5..8662163c1 100644 --- a/java/com/android/dialer/calllogutils/res/values/colors.xml +++ b/java/com/android/dialer/calllogutils/res/values/colors.xml @@ -19,6 +19,4 @@ <color name="missed_call">#C53929</color> <!-- Color for answered or outgoing call icons. --> <color name="answered_call">#00c853</color> - <!-- Color for blocked call icons. --> - <color name="blocked_call">@color/dialer_secondary_text_color</color> </resources>
\ No newline at end of file |