diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-11 21:48:29 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-11 21:48:29 +0000 |
commit | 04e88264e69ec2b6974a4d9d6acfa7cd27934e5a (patch) | |
tree | 8d3fe7e8212bfaf312bb5159f898b56a7004f84e /java/com/android/incallui/call/CallList.java | |
parent | aab6dc9f075fd8576ffc78c1f983b8fb1d3e77fa (diff) | |
parent | 9ad8a72f81d9868e50e27199bbca248090e7aba9 (diff) |
Merge "Update Spam module to use Dagger"
Diffstat (limited to 'java/com/android/incallui/call/CallList.java')
-rw-r--r-- | java/com/android/incallui/call/CallList.java | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/java/com/android/incallui/call/CallList.java b/java/com/android/incallui/call/CallList.java index fd43a4aaa..d2ac483a7 100644 --- a/java/com/android/incallui/call/CallList.java +++ b/java/com/android/incallui/call/CallList.java @@ -39,7 +39,7 @@ import com.android.dialer.logging.Logger; import com.android.dialer.logging.LoggingBindings; import com.android.dialer.shortcuts.ShortcutUsageReporter; import com.android.dialer.spam.Spam; -import com.android.dialer.spam.SpamBindings; +import com.android.dialer.spam.SpamComponent; import com.android.incallui.call.DialerCall.State; import com.android.incallui.latencyreport.LatencyReport; import com.android.incallui.util.TelecomCallUtil; @@ -141,13 +141,14 @@ public class CallList implements DialerCallDelegate { Trace.beginSection("checkSpam"); call.addListener(new DialerCallListenerImpl(call)); LogUtil.d("CallList.onCallAdded", "callState=" + call.getState()); - if (Spam.get(context).isSpamEnabled()) { + if (SpamComponent.get(context).spam().isSpamEnabled()) { String number = TelecomCallUtil.getNumber(telecomCall); - Spam.get(context) + SpamComponent.get(context) + .spam() .checkSpamStatus( number, call.getCountryIso(), - new SpamBindings.Listener() { + new Spam.Listener() { @Override public void onComplete(boolean isSpam) { boolean isIncomingCall = @@ -262,33 +263,36 @@ public class CallList implements DialerCallDelegate { private void updateUserMarkedSpamStatus( final DialerCall call, final Context context, String number) { - Spam.get(context) + SpamComponent.get(context) + .spam() .checkUserMarkedNonSpamStatus( number, call.getCountryIso(), - new SpamBindings.Listener() { + new Spam.Listener() { @Override public void onComplete(boolean isInUserWhiteList) { call.setIsInUserWhiteList(isInUserWhiteList); } }); - Spam.get(context) + SpamComponent.get(context) + .spam() .checkGlobalSpamListStatus( number, call.getCountryIso(), - new SpamBindings.Listener() { + new Spam.Listener() { @Override public void onComplete(boolean isInGlobalSpamList) { call.setIsInGlobalSpamList(isInGlobalSpamList); } }); - Spam.get(context) + SpamComponent.get(context) + .spam() .checkUserMarkedSpamStatus( number, call.getCountryIso(), - new SpamBindings.Listener() { + new Spam.Listener() { @Override public void onComplete(boolean isInUserSpamList) { call.setIsInUserSpamList(isInUserSpamList); |