diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-27 23:19:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-27 23:19:04 +0000 |
commit | fc81a030a7b4f6d4a497f71aed593d398795e7da (patch) | |
tree | b310c6eaf45d6649479a531069a030688623e157 /java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java | |
parent | 0e130eb65c12f52417c731e28330f96b8f71521d (diff) | |
parent | 2cd229918629b59fa7630805945f5874cd1b5a5e (diff) |
Merge changes I04e48572,I2db1fc85
* changes:
Fixing transcription branding UI bug
Parameterized PhoneLookup with submessage type.
Diffstat (limited to 'java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java')
-rw-r--r-- | java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java index 042ff30a2..56e909e84 100644 --- a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java +++ b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java @@ -65,7 +65,7 @@ import javax.inject.Inject; */ public final class PhoneLookupDataSource implements CallLogDataSource { - private final PhoneLookup phoneLookup; + private final PhoneLookup<PhoneLookupInfo> phoneLookup; private final ListeningExecutorService backgroundExecutorService; private final ListeningExecutorService lightweightExecutorService; @@ -88,7 +88,7 @@ public final class PhoneLookupDataSource implements CallLogDataSource { @Inject PhoneLookupDataSource( - PhoneLookup phoneLookup, + PhoneLookup<PhoneLookupInfo> phoneLookup, @BackgroundExecutor ListeningExecutorService backgroundExecutorService, @LightweightExecutor ListeningExecutorService lightweightExecutorService) { this.phoneLookup = phoneLookup; @@ -123,8 +123,8 @@ public final class PhoneLookupDataSource implements CallLogDataSource { * provided mutations. (Note that at this point, data may not be fully up-to-date, but the * next steps will take care of that.) * <li>Uses all of the numbers from AnnotatedCallLog to invoke (composite) {@link - * PhoneLookup#getMostRecentPhoneLookupInfo(ImmutableMap)} - * <li>Looks through the results of getMostRecentPhoneLookupInfo + * PhoneLookup#getMostRecentInfo(ImmutableMap)} + * <li>Looks through the results of getMostRecentInfo * <ul> * <li>For each number, checks if the original PhoneLookupInfo differs from the new one * <li>If so, it applies the update to the mutations and (in onSuccessfulFill) writes the @@ -155,9 +155,7 @@ public final class PhoneLookupDataSource implements CallLogDataSource { // Use the original info map to generate the updated info map by delegating to phoneLookup. ListenableFuture<ImmutableMap<DialerPhoneNumber, PhoneLookupInfo>> updatedInfoMapFuture = Futures.transformAsync( - originalInfoMapFuture, - phoneLookup::getMostRecentPhoneLookupInfo, - lightweightExecutorService); + originalInfoMapFuture, phoneLookup::getMostRecentInfo, lightweightExecutorService); // This is the computation that will use the result of all of the above. Callable<ImmutableMap<Long, PhoneLookupInfo>> computeRowsToUpdate = |