summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-08-06 14:07:55 -0700
committerAndrew Lee <anwlee@google.com>2015-08-06 18:13:37 -0700
commit52eca47d5eec602996909641f9d533ad5acf3fcc (patch)
tree7e431b74d17f6e4ffae39bee1eb7a0cf126cc29d
parent58de00fda096bec22a3896316e1da73a6c2d8a45 (diff)
Don't show "Message" action for Unknown numbers.
Bug: 22879229 Change-Id: Ib205ef23e91dbb7e275930c49acfc89cf59803aa
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemViewHolder.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
index 0fa5e6d33..d85deb36f 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
@@ -279,10 +279,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
}
} else {
// Treat as normal list item; show call button, if possible.
- boolean canPlaceCallToNumber =
- PhoneNumberUtil.canPlaceCallsTo(number, numberPresentation);
-
- if (canPlaceCallToNumber) {
+ if (PhoneNumberUtil.canPlaceCallsTo(number, numberPresentation)) {
boolean isVoicemailNumber =
mTelecomCallLogCache.isVoicemailNumber(accountHandle, number);
if (isVoicemailNumber) {
@@ -364,7 +361,12 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
addToExistingContactButtonView.setVisibility(View.GONE);
}
- sendMessageView.setTag(IntentProvider.getSendSmsIntentProvider(number));
+ if (canPlaceCallToNumber) {
+ sendMessageView.setTag(IntentProvider.getSendSmsIntentProvider(number));
+ sendMessageView.setVisibility(View.VISIBLE);
+ } else {
+ sendMessageView.setVisibility(View.GONE);
+ }
mCallLogListItemHelper.setActionContentDescriptions(this);