From 97e333cf52c7fd2cf34429f89fe28cb33f1b34e2 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 29 Oct 2015 17:40:27 -0700 Subject: Fix checking for invalid numbers. Some of the checking for invalid numbers was broken by code cleanups yesterday, and blocking of numbers which can't be normalized had been allowed (which is no good). Fixing this, by unifying checks for whether or not a number can be blocked. Bug: 25343277 Change-Id: Ia631a3e53e3f9ed58e173055a5e18086d95c9d02 --- src/com/android/dialer/CallDetailActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/com/android/dialer/CallDetailActivity.java') diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 47c3cf0ea..4e7e7b3c0 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -196,7 +196,6 @@ public class CallDetailActivity extends AppCompatActivity private PhoneCallDetails mDetails; protected String mNumber; private Uri mVoicemailUri; - private String mDefaultCountryIso; private String mDisplayNumber; private ListView mHistoryList; @@ -242,7 +241,6 @@ public class CallDetailActivity extends AppCompatActivity mCallerName = (TextView) findViewById(R.id.caller_name); mCallerNumber = (TextView) findViewById(R.id.caller_number); mAccountLabel = (TextView) findViewById(R.id.phone_account_label); - mDefaultCountryIso = GeoUtil.getCurrentCountryIso(this); mContactPhotoManager = ContactPhotoManager.getInstance(this); mCallButton = findViewById(R.id.call_back_button); @@ -391,7 +389,8 @@ public class CallDetailActivity extends AppCompatActivity } private void updatePhotoAndBlockActionItem() { - if (mDetails == null || !FilteredNumbersUtil.canBlockNumber(this, mNumber)) { + if (mDetails == null || + !FilteredNumbersUtil.canBlockNumber(this, mNumber, mDetails.countryIso)) { return; } -- cgit v1.2.3