summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-08-07 17:28:05 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-07 17:28:05 +0000
commit503f6fa38a482b4bd13136a61081ce0be3a18fd4 (patch)
treee23b31efd45f3ef53b12025cb81f65c95d8fbb37
parent752880a3f2fc1edd3fa44c1bf21077949438d7c6 (diff)
parent52eca47d5eec602996909641f9d533ad5acf3fcc (diff)
Merge "Don't show "Message" action for Unknown numbers."
-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);