diff options
author | Roman Birg <roman@cyngn.com> | 2014-11-12 17:01:47 -0800 |
---|---|---|
committer | Matt Garnes <matt@cyngn.com> | 2014-11-13 17:48:12 -0800 |
commit | bb88afb43b92d9d7716ad64ebdd616e95a1d43cd (patch) | |
tree | 86ce47d0dbd0c51debcfc8139c16f8218fca4b34 /src | |
parent | 2e7cd186b76d0ba5d0d926156e34cfd453a29c2e (diff) | |
download | android_packages_apps_Dialer-bb88afb43b92d9d7716ad64ebdd616e95a1d43cd.tar.gz android_packages_apps_Dialer-bb88afb43b92d9d7716ad64ebdd616e95a1d43cd.tar.bz2 android_packages_apps_Dialer-bb88afb43b92d9d7716ad64ebdd616e95a1d43cd.zip |
Dialer: add blacklist call logging (3/3)
Change-Id: Ie569981381d46c8946a603795fe072df106546b0
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--] | src/com/android/dialer/calllog/CallTypeHelper.java | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | src/com/android/dialer/calllog/CallTypeIconsView.java | 14 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/CallTypeHelper.java b/src/com/android/dialer/calllog/CallTypeHelper.java index 36c0975bd..3603ce6c3 100644..100755 --- a/src/com/android/dialer/calllog/CallTypeHelper.java +++ b/src/com/android/dialer/calllog/CallTypeHelper.java @@ -39,6 +39,8 @@ public class CallTypeHelper { private final CharSequence mMissedVideoName; /** Name used to identify voicemail calls. */ private final CharSequence mVoicemailName; + /** Name used to identify blacklisted calls */ + private final CharSequence mBlacklistedName; /** Color used to identify new missed calls. */ private final int mNewMissedColor; /** Color used to identify new voicemail calls. */ @@ -53,6 +55,7 @@ public class CallTypeHelper { mOutgoingVideoName = resources.getString(R.string.type_outgoing_video); mMissedVideoName = resources.getString(R.string.type_missed_video); mVoicemailName = resources.getString(R.string.type_voicemail); + mBlacklistedName = resources.getText(R.string.type_blacklist); mNewMissedColor = resources.getColor(R.color.call_log_missed_call_highlight_color); mNewVoicemailColor = resources.getColor(R.color.call_log_voicemail_highlight_color); } @@ -84,6 +87,9 @@ public class CallTypeHelper { case Calls.VOICEMAIL_TYPE: return mVoicemailName; + case Calls.BLACKLIST_TYPE: + return mBlacklistedName; + default: return mMissedName; } diff --git a/src/com/android/dialer/calllog/CallTypeIconsView.java b/src/com/android/dialer/calllog/CallTypeIconsView.java index ef729ae39..719551320 100644..100755 --- a/src/com/android/dialer/calllog/CallTypeIconsView.java +++ b/src/com/android/dialer/calllog/CallTypeIconsView.java @@ -40,7 +40,7 @@ import java.util.List; * for ListView-recycling that a regular LinearLayout using ImageViews. */ public class CallTypeIconsView extends View { - private List<Integer> mCallTypes = Lists.newArrayListWithCapacity(3); + private List<Integer> mCallTypes = Lists.newArrayListWithCapacity(4); private boolean mShowVideo = false; private Resources mResources; private int mWidth; @@ -114,6 +114,9 @@ public class CallTypeIconsView extends View { return mResources.missed; case Calls.VOICEMAIL_TYPE: return mResources.voicemail; + case Calls.BLACKLIST_TYPE: + return mResources.blacklist; + default: // It is possible for users to end up with calls with unknown call types in their // call history, possibly due to 3rd party call log implementations (e.g. to @@ -176,10 +179,16 @@ public class CallTypeIconsView extends View { public final Drawable videoCall; /** + * Drawable representing blacklisted call. + */ + public final Drawable blacklist; + + /** * The margin to use for icons. */ public final int iconMargin; + /** * Configures the call icon drawables. * A single white call arrow which points down and left is used as a basis for all of the @@ -201,7 +210,8 @@ public class CallTypeIconsView extends View { // above will be recolored here. missed = r.getDrawable(R.drawable.ic_call_arrow).mutate(); missed.setColorFilter(r.getColor(R.color.missed_call), PorterDuff.Mode.MULTIPLY); - + blacklist = r.getDrawable(R.drawable.ic_call_arrow).mutate(); + blacklist.setColorFilter(0x000, PorterDuff.Mode.MULTIPLY); voicemail = r.getDrawable(R.drawable.ic_call_voicemail_holo_dark); // Get the video call icon, scaled to match the height of the call arrows. |