From 711512175cb047b5ea7c9b15013f3b1fc5c2cae7 Mon Sep 17 00:00:00 2001 From: zachh Date: Wed, 1 Nov 2017 16:57:30 -0700 Subject: Fixed AOSP breakage due to incompatible guava api. Test: none PiperOrigin-RevId: 174258291 Change-Id: Idf4eb0096fef383bd5f3544fdedba03528d14f41 --- .../dialer/phonelookup/composite/CompositePhoneLookup.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java b/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java index a9416266c..10b0e24d2 100644 --- a/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java +++ b/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java @@ -21,6 +21,7 @@ import android.telecom.Call; import com.android.dialer.DialerPhoneNumber; import com.android.dialer.phonelookup.PhoneLookup; import com.android.dialer.phonelookup.PhoneLookupInfo; +import com.google.common.base.Function; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -56,12 +57,15 @@ public final class CompositePhoneLookup implements PhoneLookup { } return Futures.transform( Futures.allAsList(futures), - infos -> { - PhoneLookupInfo.Builder mergedInfo = PhoneLookupInfo.newBuilder(); - for (PhoneLookupInfo info : infos) { - mergedInfo.mergeFrom(info); + new Function, PhoneLookupInfo>() { + @Override + public PhoneLookupInfo apply(List infos) { + PhoneLookupInfo.Builder mergedInfo = PhoneLookupInfo.newBuilder(); + for (PhoneLookupInfo info : infos) { + mergedInfo.mergeFrom(info); + } + return mergedInfo.build(); } - return mergedInfo.build(); }, MoreExecutors.directExecutor()); } -- cgit v1.2.3