diff options
author | Andrew Lee <anwlee@google.com> | 2015-09-25 17:12:58 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-10-02 15:40:03 -0700 |
commit | 838988bf34229b33ed39bb7dc7109427da264c81 (patch) | |
tree | ea1bd2be21aaa0cc9d5c72516793cfd5ec27a0fd /src/com/android/dialer/calllog/CallLogListItemHelper.java | |
parent | 071d0a4f1c8cf6b6131b7aeabfd2c6b0560b413f (diff) |
Add BLOCKED call type and util to mark in call log.
To support call blocking, added BLOCKED call type.
Also added utility to be able to mark the most recent call from a
number as BLOCKEd in the call log database.
Added REJECTED call type as well. This is not presently used within
our application, but we want to reserve the integer, anticipating
changes in the framework to add this constant.
Introduced AppCompConstants, because BLOCKED and REJECTED call type
values will not be defined as part of the API on M devices. Change
existing call type constants to reference this compatability class.
Bug: 24341350
Change-Id: I523ebd8dd1844a3b71a69a14bd38073be5940804
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogListItemHelper.java')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemHelper.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/CallLogListItemHelper.java b/src/com/android/dialer/calllog/CallLogListItemHelper.java index d18e274ba..8e45dd36f 100644 --- a/src/com/android/dialer/calllog/CallLogListItemHelper.java +++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java @@ -24,6 +24,7 @@ import android.text.TextUtils; import android.util.Log; import com.android.dialer.PhoneCallDetails; +import com.android.dialer.util.AppCompatConstants; import com.android.dialer.R; /** @@ -220,11 +221,12 @@ import com.android.dialer.R; int lastCallType = getLastCallType(callTypes); int stringID; - if (lastCallType == Calls.VOICEMAIL_TYPE || lastCallType == Calls.MISSED_TYPE) { + if (lastCallType == AppCompatConstants.CALLS_VOICEMAIL_TYPE + || lastCallType == AppCompatConstants.CALLS_MISSED_TYPE) { //Message: Missed call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>, //<PhoneAccount>. stringID = R.string.description_incoming_missed_call; - } else if (lastCallType == Calls.INCOMING_TYPE) { + } else if (lastCallType == AppCompatConstants.CALLS_INCOMING_TYPE) { //Message: Answered call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>, //<PhoneAccount>. stringID = R.string.description_incoming_answered_call; |