summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CallList.java35
1 files changed, 19 insertions, 16 deletions
diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java
index b93744047..71387fe48 100644
--- a/InCallUI/src/com/android/incallui/CallList.java
+++ b/InCallUI/src/com/android/incallui/CallList.java
@@ -102,25 +102,28 @@ public class CallList {
}
};
handler.postDelayed(runnable, BLOCK_QUERY_TIMEOUT_MS);
- try {
- mFilteredQueryHandler.isBlocked(
- new FilteredNumberAsyncQueryHandler.OnCheckBlockedListener() {
- @Override
- public void onCheckComplete(final Integer id) {
+ if (mFilteredQueryHandler.startBlockedQuery(
+ new FilteredNumberAsyncQueryHandler.OnCheckBlockedListener() {
+ @Override
+ public void onCheckComplete(final Integer id) {
+ if (!hasTimedOut.get()) {
+ handler.removeCallbacks(runnable);
+ }
+ if (id == null) {
if (!hasTimedOut.get()) {
- handler.removeCallbacks(runnable);
- }
- if (id == null) {
- if (!hasTimedOut.get()) {
- onCallAddedInternal(call);
- }
- } else {
- call.blockCall();
+ onCallAddedInternal(call);
}
+ } else {
+ call.blockCall();
}
- }, null, call.getNumber(), countryIso);
- } catch (IllegalArgumentException e) {
- Log.d(this, "onCallAdded: invalid number, skipping block checking");
+ }
+ }, null, call.getNumber(), countryIso)) {
+ Log.d(this, "onCallAdded: invalid number "
+ + call.getNumber() + ", skipping block checking");
+ if (!hasTimedOut.get()) {
+ handler.removeCallbacks(runnable);
+ onCallAddedInternal(call);
+ }
}
} else {
onCallAddedInternal(call);