From 9050823ccf6f512e06ad65c8a741cb17cbc4a833 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Fri, 24 Mar 2017 09:31:16 -0700 Subject: Update AOSP Dialer source from internal google3 repository at cl/151128062 Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/150756069 (3/21/2017) to cl/151128062 (3/24/2017). Notable this release: - Explicitly enumerate host and target dependencies. - Update proguard flag references. This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Bug: 33210202 36511925 Addresses 33210202 - Proguard support 36511925 - Compiler warnings when building against platform sdk Change-Id: I448ec3b3f2358886859cf7a4ef76a8fcef3244ae --- .../dialer/enrichedcall/EnrichedCallComponent.java | 3 +++ .../dialer/enrichedcall/EnrichedCallManager.java | 24 +++++++++--------- .../dialer/enrichedcall/RcsVideoShareFactory.java | 29 ++++++++++++++++++++++ .../dialer/enrichedcall/VideoShareSession.java | 20 --------------- .../enrichedcall/stub/EnrichedCallManagerStub.java | 25 +++++++++---------- .../enrichedcall/stub/StubEnrichedCallModule.java | 7 ++++++ 6 files changed, 63 insertions(+), 45 deletions(-) create mode 100644 java/com/android/dialer/enrichedcall/RcsVideoShareFactory.java delete mode 100644 java/com/android/dialer/enrichedcall/VideoShareSession.java (limited to 'java/com/android/dialer/enrichedcall') diff --git a/java/com/android/dialer/enrichedcall/EnrichedCallComponent.java b/java/com/android/dialer/enrichedcall/EnrichedCallComponent.java index c773a2dfa..2ed2e94dc 100644 --- a/java/com/android/dialer/enrichedcall/EnrichedCallComponent.java +++ b/java/com/android/dialer/enrichedcall/EnrichedCallComponent.java @@ -28,6 +28,9 @@ public abstract class EnrichedCallComponent { @NonNull public abstract EnrichedCallManager getEnrichedCallManager(); + @NonNull + public abstract RcsVideoShareFactory getRcsVideoShareFactory(); + public static EnrichedCallComponent get(Context context) { return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component()) .enrichedCallComponent(); diff --git a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java index a36b2cc0d..978fb1346 100644 --- a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java +++ b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java @@ -20,7 +20,6 @@ import android.support.annotation.IntDef; import android.support.annotation.MainThread; import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; import com.android.dialer.calldetails.nano.CallDetailsEntries; import com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry; import com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult; @@ -184,14 +183,23 @@ public interface EnrichedCallManager { Session getSession(long sessionId); /** - * Returns a mapping of enriched call data for all of the given {@link CallDetailsEntries}. + * Starts an asynchronous process to get all historical data for the given number and set of + * {@link CallDetailsEntries}. + */ + @MainThread + void requestAllHistoricalData(@NonNull String number, @NonNull CallDetailsEntries entries); + + /** + * Returns a mapping of enriched call data for all of the given {@link CallDetailsEntries}, which + * should not be modified. A {@code null} return indicates that clients should call {@link + * #requestAllHistoricalData(String, CallDetailsEntries)}. * *

The mapping is created by finding the HistoryResults whose timestamps occurred during or * close after a CallDetailsEntry. A CallDetailsEntry can have multiple HistoryResults in the * event that both a CallComposer message and PostCall message were sent for the same call. */ - @WorkerThread - @NonNull + @Nullable + @MainThread Map> getAllHistoricalData( @NonNull String number, @NonNull CallDetailsEntries entries); @@ -295,12 +303,4 @@ public interface EnrichedCallManager { */ @MainThread void endVideoShareSession(long sessionId); - - /** - * Returns the {@link VideoShareSession} for the given sessionId, or {@code null} if no session - * exists. - */ - @MainThread - @Nullable - VideoShareSession getVideoShareSession(long sessionId); } diff --git a/java/com/android/dialer/enrichedcall/RcsVideoShareFactory.java b/java/com/android/dialer/enrichedcall/RcsVideoShareFactory.java new file mode 100644 index 000000000..566d9f339 --- /dev/null +++ b/java/com/android/dialer/enrichedcall/RcsVideoShareFactory.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ +package com.android.dialer.enrichedcall; + +import android.support.annotation.NonNull; +import com.android.incallui.videotech.VideoTech; +import com.android.incallui.videotech.VideoTech.VideoTechListener; + +/** Interface for creating new RCS video tech instances. */ +public interface RcsVideoShareFactory { + + VideoTech newRcsVideoShare( + @NonNull EnrichedCallManager enrichedCallManager, + @NonNull VideoTechListener videoTechListener, + @NonNull String number); +} diff --git a/java/com/android/dialer/enrichedcall/VideoShareSession.java b/java/com/android/dialer/enrichedcall/VideoShareSession.java deleted file mode 100644 index 07bc4ed09..000000000 --- a/java/com/android/dialer/enrichedcall/VideoShareSession.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -package com.android.dialer.enrichedcall; - -/** Holds state information and data about video share sessions. */ -public interface VideoShareSession {} diff --git a/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java b/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java index 01d1f2aac..bedfdae34 100644 --- a/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java +++ b/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java @@ -16,17 +16,15 @@ package com.android.dialer.enrichedcall.stub; +import android.support.annotation.MainThread; import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; -import android.util.ArrayMap; import com.android.dialer.calldetails.nano.CallDetailsEntries; import com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry; import com.android.dialer.common.Assert; import com.android.dialer.enrichedcall.EnrichedCallCapabilities; import com.android.dialer.enrichedcall.EnrichedCallManager; import com.android.dialer.enrichedcall.Session; -import com.android.dialer.enrichedcall.VideoShareSession; import com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult; import com.android.dialer.enrichedcall.videoshare.VideoShareListener; import com.android.dialer.multimedia.MultimediaData; @@ -86,13 +84,20 @@ public final class EnrichedCallManagerStub implements EnrichedCallManager { return null; } - @NonNull + @Nullable @Override - @WorkerThread + @MainThread public Map> getAllHistoricalData( @NonNull String number, @NonNull CallDetailsEntries entries) { - Assert.isWorkerThread(); - return new ArrayMap<>(); + Assert.isMainThread(); + return null; + } + + @MainThread + @Override + public void requestAllHistoricalData( + @NonNull String number, @NonNull CallDetailsEntries entries) { + Assert.isMainThread(); } @Override @@ -136,10 +141,4 @@ public final class EnrichedCallManagerStub implements EnrichedCallManager { @Override public void endVideoShareSession(long sessionId) {} - - @Nullable - @Override - public VideoShareSession getVideoShareSession(long sessionId) { - return null; - } } diff --git a/java/com/android/dialer/enrichedcall/stub/StubEnrichedCallModule.java b/java/com/android/dialer/enrichedcall/stub/StubEnrichedCallModule.java index 0ec72111e..6ee1a86a9 100644 --- a/java/com/android/dialer/enrichedcall/stub/StubEnrichedCallModule.java +++ b/java/com/android/dialer/enrichedcall/stub/StubEnrichedCallModule.java @@ -17,6 +17,7 @@ package com.android.dialer.enrichedcall.stub; import com.android.dialer.enrichedcall.EnrichedCallManager; +import com.android.dialer.enrichedcall.RcsVideoShareFactory; import dagger.Module; import dagger.Provides; import javax.inject.Singleton; @@ -31,5 +32,11 @@ public class StubEnrichedCallModule { return new EnrichedCallManagerStub(); } + @Provides + @Singleton + static RcsVideoShareFactory providesRcsVideoShareFactory() { + return (enrichedCallManager, videoTechListener, number) -> null; + } + private StubEnrichedCallModule() {} } -- cgit v1.2.3