diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-28 16:22:39 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-10-30 16:57:25 -0700 |
commit | 4805ae099d7540ee42b1428bf5fb6ca75a4855ed (patch) | |
tree | 88f1dd0dc8c3ed6ab80e35dd4f550da2869deac0 /src/com/android/dialer/CallDetailActivity.java | |
parent | 0af3d293e14fe665733076877d7bd7ad6851a091 (diff) |
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
Diffstat (limited to 'src/com/android/dialer/CallDetailActivity.java')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
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(); } |