From d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Wed, 15 Mar 2017 14:41:07 -0700 Subject: Update Dialer source from latest green build. * Refactor voicemail component * Add new enriched calling components Test: treehugger, manual aosp testing Change-Id: I521a0f86327d4b42e14d93927c7d613044ed5942 --- .../call/InCallVideoCallCallbackNotifier.java | 165 +-------------------- 1 file changed, 1 insertion(+), 164 deletions(-) (limited to 'java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java') diff --git a/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java b/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java index 4a949263c..1cb9f742e 100644 --- a/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java +++ b/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java @@ -18,16 +18,12 @@ package com.android.incallui.call; import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import com.android.dialer.common.LogUtil; import java.util.Collections; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -/** - * Class used by {@link InCallService.VideoCallCallback} to notify interested parties of incoming - * events. - */ +/** Class used to notify interested parties of incoming video related events. */ public class InCallVideoCallCallbackNotifier { /** Singleton instance of this class. */ @@ -37,12 +33,6 @@ public class InCallVideoCallCallbackNotifier { * ConcurrentHashMap constructor params: 8 is initial table size, 0.9f is load factor before * resizing, 1 means we only expect a single thread to access the map so make only a single shard */ - private final Set mSessionModificationListeners = - Collections.newSetFromMap( - new ConcurrentHashMap(8, 0.9f, 1)); - - private final Set mVideoEventListeners = - Collections.newSetFromMap(new ConcurrentHashMap(8, 0.9f, 1)); private final Set mSurfaceChangeListeners = Collections.newSetFromMap(new ConcurrentHashMap(8, 0.9f, 1)); @@ -54,48 +44,6 @@ public class InCallVideoCallCallbackNotifier { return sInstance; } - /** - * Adds a new {@link SessionModificationListener}. - * - * @param listener The listener. - */ - public void addSessionModificationListener(@NonNull SessionModificationListener listener) { - Objects.requireNonNull(listener); - mSessionModificationListeners.add(listener); - } - - /** - * Remove a {@link SessionModificationListener}. - * - * @param listener The listener. - */ - public void removeSessionModificationListener(@Nullable SessionModificationListener listener) { - if (listener != null) { - mSessionModificationListeners.remove(listener); - } - } - - /** - * Adds a new {@link VideoEventListener}. - * - * @param listener The listener. - */ - public void addVideoEventListener(@NonNull VideoEventListener listener) { - Objects.requireNonNull(listener); - mVideoEventListeners.add(listener); - } - - /** - * Remove a {@link VideoEventListener}. - * - * @param listener The listener. - */ - public void removeVideoEventListener(@Nullable VideoEventListener listener) { - if (listener != null) { - mVideoEventListeners.remove(listener); - } - } - /** * Adds a new {@link SurfaceChangeListener}. * @@ -117,56 +65,6 @@ public class InCallVideoCallCallbackNotifier { } } - /** - * Inform listeners of an upgrade to video request for a call. - * - * @param call The call. - * @param videoState The video state we want to upgrade to. - */ - public void upgradeToVideoRequest(DialerCall call, int videoState) { - LogUtil.v( - "InCallVideoCallCallbackNotifier.upgradeToVideoRequest", - "call = " + call + " new video state = " + videoState); - for (SessionModificationListener listener : mSessionModificationListeners) { - listener.onUpgradeToVideoRequest(call, videoState); - } - } - - /** - * Inform listeners of a call session event. - * - * @param event The call session event. - */ - public void callSessionEvent(int event) { - for (VideoEventListener listener : mVideoEventListeners) { - listener.onCallSessionEvent(event); - } - } - - /** - * Inform listeners of a downgrade to audio. - * - * @param call The call. - * @param paused The paused state. - */ - public void peerPausedStateChanged(DialerCall call, boolean paused) { - for (VideoEventListener listener : mVideoEventListeners) { - listener.onPeerPauseStateChanged(call, paused); - } - } - - /** - * Inform listeners of any change in the video quality of the call - * - * @param call The call. - * @param videoQuality The updated video quality of the call. - */ - public void videoQualityChanged(DialerCall call, int videoQuality) { - for (VideoEventListener listener : mVideoEventListeners) { - listener.onVideoQualityChanged(call, videoQuality); - } - } - /** * Inform listeners of a change to peer dimensions. * @@ -193,67 +91,6 @@ public class InCallVideoCallCallbackNotifier { } } - /** - * Inform listeners of a change to call data usage. - * - * @param dataUsage data usage value - */ - public void callDataUsageChanged(long dataUsage) { - for (VideoEventListener listener : mVideoEventListeners) { - listener.onCallDataUsageChange(dataUsage); - } - } - - /** Listener interface for any class that wants to be notified of upgrade to video request. */ - public interface SessionModificationListener { - - /** - * Called when a peer request is received to upgrade an audio-only call to a video call. - * - * @param call The call the request was received for. - * @param videoState The requested video state. - */ - void onUpgradeToVideoRequest(DialerCall call, int videoState); - } - - /** - * Listener interface for any class that wants to be notified of video events, including pause and - * un-pause of peer video, video quality changes. - */ - public interface VideoEventListener { - - /** - * Called when the peer pauses or un-pauses video transmission. - * - * @param call The call which paused or un-paused video transmission. - * @param paused {@code True} when the video transmission is paused, {@code false} otherwise. - */ - void onPeerPauseStateChanged(DialerCall call, boolean paused); - - /** - * Called when the video quality changes. - * - * @param call The call whose video quality changes. - * @param videoCallQuality - values are QUALITY_HIGH, MEDIUM, LOW and UNKNOWN. - */ - void onVideoQualityChanged(DialerCall call, int videoCallQuality); - - /* - * Called when call data usage value is requested or when call data usage value is updated - * because of a call state change - * - * @param dataUsage call data usage value - */ - void onCallDataUsageChange(long dataUsage); - - /** - * Called when call session event is raised. - * - * @param event The call session event. - */ - void onCallSessionEvent(int event); - } - /** * Listener interface for any class that wants to be notified of changes to the video surfaces. */ -- cgit v1.2.3