From 4805ae099d7540ee42b1428bf5fb6ca75a4855ed Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 28 Oct 2015 16:22:39 -0700 Subject: Rename check method to isBlockedNumber. + Clearer name about functionality, and async nature. + Change it to return "false" if it fails and is trying to block an invalid number, rather than returning "true". This matches a more standard success/fail return paradigm. + Update logic for showing "invalid" message based on return value. + Simplify parameter set which it takes in; always take nubmer and countryIso, because they can be used to calculate the normalized #. Bug: 25343277 Change-Id: If6fb28a6395e207047f4b27bfac37f5c70a9bac3 --- src/com/android/dialer/CallDetailActivity.java | 6 +++--- 1 file changed, 3 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 4e7e7b3c0..ab63ddc21 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -394,7 +394,7 @@ public class CallDetailActivity extends AppCompatActivity return; } - boolean failed = mFilteredNumberAsyncQueryHandler.startBlockedQuery( + final boolean success = mFilteredNumberAsyncQueryHandler.isBlockedNumber( new OnCheckBlockedListener() { @Override public void onCheckComplete(Integer id) { @@ -403,9 +403,9 @@ public class CallDetailActivity extends AppCompatActivity updateContactPhoto(); updateBlockActionItem(); } - }, null, mNumber, mDetails.countryIso); + }, mNumber, mDetails.countryIso); - if (failed) { + if (!success) { updateContactPhoto(); updateBlockActionItem(); } -- cgit v1.2.3