diff options
author | Anne Rong <annerong@google.com> | 2015-09-18 00:33:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-18 00:33:12 +0000 |
commit | 78205527bd51fda09f0698afcc9654888b9da667 (patch) | |
tree | be565344f32ee665dcd5db75118a025fb85850b2 /InCallUI | |
parent | aade8ed7c3d36a55ae6b0703ca7b257097ddcc91 (diff) | |
parent | 204f7f076ac79684484044f3c534c6b2fe71b7e4 (diff) |
Merge "FilteredNumberAsyncQueryHandler should not crash if number is invalid" into ub-contactsdialer-a-dev
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallList.java | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java index 018ac10ca..b93744047 100644 --- a/InCallUI/src/com/android/incallui/CallList.java +++ b/InCallUI/src/com/android/incallui/CallList.java @@ -102,22 +102,26 @@ public class CallList { } }; handler.postDelayed(runnable, BLOCK_QUERY_TIMEOUT_MS); - mFilteredQueryHandler.isBlocked( - new FilteredNumberAsyncQueryHandler.OnCheckBlockedListener() { - @Override - public void onCheckComplete(final Integer id) { - if (!hasTimedOut.get()) { - handler.removeCallbacks(runnable); - } - if (id == null) { + try { + mFilteredQueryHandler.isBlocked( + new FilteredNumberAsyncQueryHandler.OnCheckBlockedListener() { + @Override + public void onCheckComplete(final Integer id) { if (!hasTimedOut.get()) { - onCallAddedInternal(call); + handler.removeCallbacks(runnable); + } + if (id == null) { + if (!hasTimedOut.get()) { + onCallAddedInternal(call); + } + } else { + call.blockCall(); } - } else { - call.blockCall(); } - } - }, null, call.getNumber(), countryIso); + }, null, call.getNumber(), countryIso); + } catch (IllegalArgumentException e) { + Log.d(this, "onCallAdded: invalid number, skipping block checking"); + } } else { onCallAddedInternal(call); } |