diff options
author | Nancy Chen <nancychen@google.com> | 2016-01-14 16:04:42 -0800 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2016-01-14 18:34:08 -0800 |
commit | 6fa29e29cd31cbbfb8e629fae39c8c6b939fe347 (patch) | |
tree | 4738697c38f0826122f85db7815066840d17204e /src/com/android/dialer/CallDetailActivity.java | |
parent | 662aed1de350c38751a962528651535a35a22789 (diff) |
Hide "copy" and "block" options for unknown numbers in Call Details.
If the number string is unknown or can't be called, the call details
screen should not show the "copy number" and "block number" options.
Bug: 26445855
Change-Id: I219d99709de75e641e3603c52209fe362a20e6ba
Diffstat (limited to 'src/com/android/dialer/CallDetailActivity.java')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index c045967a2..56e29a9d7 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -153,6 +153,8 @@ public class CallDetailActivity extends AppCompatActivity final boolean canPlaceCallsTo = PhoneNumberUtil.canPlaceCallsTo(mNumber, mDetails.numberPresentation); mCallButton.setVisibility(canPlaceCallsTo ? View.VISIBLE : View.GONE); + mCopyNumberActionItem.setVisibility(canPlaceCallsTo ? View.VISIBLE : View.GONE); + mBlockNumberActionItem.setVisibility(canPlaceCallsTo ? View.VISIBLE : View.GONE); final boolean isSipNumber = PhoneNumberUtil.isSipNumber(mNumber); final boolean isVoicemailNumber = @@ -221,6 +223,7 @@ public class CallDetailActivity extends AppCompatActivity private TextView mBlockNumberActionItem; private View mEditBeforeCallActionItem; private View mReportActionItem; + private View mCopyNumberActionItem; private Integer mBlockedNumberId; @@ -279,8 +282,8 @@ public class CallDetailActivity extends AppCompatActivity mReportActionItem = findViewById(R.id.call_detail_action_report); mReportActionItem.setOnClickListener(this); - View copyActionItem = findViewById(R.id.call_detail_action_copy); - copyActionItem.setOnClickListener(this); + mCopyNumberActionItem = findViewById(R.id.call_detail_action_copy); + mCopyNumberActionItem.setOnClickListener(this); if (getIntent().getBooleanExtra(EXTRA_FROM_NOTIFICATION, false)) { closeSystemDialogs(); |