diff options
-rw-r--r-- | Android.mk | 12 | ||||
-rw-r--r-- | java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java | 14 |
2 files changed, 16 insertions, 10 deletions
diff --git a/Android.mk b/Android.mk index 094ad5a6c..9defc7e45 100644 --- a/Android.mk +++ b/Android.mk @@ -184,7 +184,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ dialer-libshortcutbadger-target \ dialer-mime4j-core-target \ dialer-mime4j-dom-target \ - guava \ + dialer-guava-target \ jsr305 \ libbackup \ libphonenumber \ @@ -278,6 +278,16 @@ include $(BUILD_HOST_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE_CLASS := JAVA_LIBRARIES +LOCAL_MODULE := dialer-guava-target +LOCAL_SDK_VERSION := current +LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/20.0/guava-20.0$(COMMON_JAVA_PACKAGE_SUFFIX) +LOCAL_UNINSTALLABLE_MODULE := true + +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := JAVA_LIBRARIES LOCAL_MODULE := dialer-dagger2-target LOCAL_SDK_VERSION := current LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.7/dagger-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) diff --git a/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java b/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java index 10b0e24d2..a9416266c 100644 --- a/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java +++ b/java/com/android/dialer/phonelookup/composite/CompositePhoneLookup.java @@ -21,7 +21,6 @@ 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; @@ -57,15 +56,12 @@ public final class CompositePhoneLookup implements PhoneLookup { } return Futures.transform( Futures.allAsList(futures), - new Function<List<PhoneLookupInfo>, PhoneLookupInfo>() { - @Override - public PhoneLookupInfo apply(List<PhoneLookupInfo> infos) { - PhoneLookupInfo.Builder mergedInfo = PhoneLookupInfo.newBuilder(); - for (PhoneLookupInfo info : infos) { - mergedInfo.mergeFrom(info); - } - return mergedInfo.build(); + infos -> { + PhoneLookupInfo.Builder mergedInfo = PhoneLookupInfo.newBuilder(); + for (PhoneLookupInfo info : infos) { + mergedInfo.mergeFrom(info); } + return mergedInfo.build(); }, MoreExecutors.directExecutor()); } |