diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-25 18:34:28 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-25 18:34:28 +0000 |
commit | 37ed24aaa2477bf662a3aebdaa18388bc5a0264a (patch) | |
tree | a1baaedfe7538758e2622ee2746a6487428db1e1 /java/com/android/incallui | |
parent | 951b417e5793d816dac9cfe8c255059654de086a (diff) | |
parent | 6a4cebdb4ccc974d04f125847c03fddec18b2b9f (diff) |
Merge "Improved dagger support for executor services."
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r-- | java/com/android/incallui/ContactInfoCache.java | 6 | ||||
-rw-r--r-- | java/com/android/incallui/ContactsAsyncHelper.java | 2 | ||||
-rw-r--r-- | java/com/android/incallui/InCallPresenter.java | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/java/com/android/incallui/ContactInfoCache.java b/java/com/android/incallui/ContactInfoCache.java index 272c2b776..2735461b2 100644 --- a/java/com/android/incallui/ContactInfoCache.java +++ b/java/com/android/incallui/ContactInfoCache.java @@ -86,8 +86,7 @@ public class ContactInfoCache implements OnImageLoadCompleteListener { private final ConcurrentHashMap<String, ContactCacheEntry> mInfoMap = new ConcurrentHashMap<>(); private final Map<String, Set<ContactInfoCacheCallback>> mCallBacks = new ArrayMap<>(); private int mQueryId; - private final DialerExecutor<CnapInformationWrapper> cachedNumberLookupExecutor = - DialerExecutors.createNonUiTaskBuilder(new CachedNumberLookupWorker()).build(); + private final DialerExecutor<CnapInformationWrapper> cachedNumberLookupExecutor; private static class CachedNumberLookupWorker implements Worker<CnapInformationWrapper, Void> { @Nullable @@ -126,6 +125,8 @@ public class ContactInfoCache implements OnImageLoadCompleteListener { Trace.beginSection("ContactInfoCache constructor"); mContext = context; mPhoneNumberService = Bindings.get(context).newPhoneNumberService(context); + cachedNumberLookupExecutor = + DialerExecutors.createNonUiTaskBuilder(mContext, new CachedNumberLookupWorker()).build(); Trace.endSection(); } @@ -718,6 +719,7 @@ public class ContactInfoCache implements OnImageLoadCompleteListener { int queryId; /** The phone number without any changes to display to the user (ex: cnap...) */ String originalPhoneNumber; + boolean shouldShowLocation; boolean isBusiness; diff --git a/java/com/android/incallui/ContactsAsyncHelper.java b/java/com/android/incallui/ContactsAsyncHelper.java index 6237ca3e5..2e893b01a 100644 --- a/java/com/android/incallui/ContactsAsyncHelper.java +++ b/java/com/android/incallui/ContactsAsyncHelper.java @@ -94,7 +94,7 @@ public class ContactsAsyncHelper { args.displayPhotoUri = displayPhotoUri; args.listener = listener; - DialerExecutors.createNonUiTaskBuilder(new Worker()) + DialerExecutors.createNonUiTaskBuilder(context, new Worker()) .onSuccess( output -> { if (args.listener != null) { diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java index b8a2baa00..8535cbc3e 100644 --- a/java/com/android/incallui/InCallPresenter.java +++ b/java/com/android/incallui/InCallPresenter.java @@ -45,7 +45,7 @@ import com.android.dialer.blocking.FilteredNumberCompat; import com.android.dialer.blocking.FilteredNumbersUtil; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.common.concurrent.DefaultDialerExecutorFactory; +import com.android.dialer.common.concurrent.DialerExecutorComponent; import com.android.dialer.enrichedcall.EnrichedCallComponent; import com.android.dialer.location.GeoUtil; import com.android.dialer.logging.InteractionEvent; @@ -373,7 +373,9 @@ public class InCallPresenter implements CallList.Listener { mCallList.addListener(this); // Create spam call list listener and add it to the list of listeners - mSpamCallListListener = new SpamCallListListener(context, new DefaultDialerExecutorFactory()); + mSpamCallListListener = + new SpamCallListListener( + context, DialerExecutorComponent.get(context).dialerExecutorFactory()); mCallList.addListener(mSpamCallListListener); VideoPauseController.getInstance().setUp(this); |