From 8e3d56ca5de3ca651d27d560eba406be21eb7aa1 Mon Sep 17 00:00:00 2001 From: maxwelb Date: Wed, 28 Jun 2017 14:04:21 -0700 Subject: Move Session State definition into Session The state of a session is more closely tied to the session itself, rather than the EnrichedCallManager. The enum was originally placed in the Manager as it was used in the API, but now that's no longer the case. This CL moves the Session State declaration into Session, which is a more appropriate location. Test: tap PiperOrigin-RevId: 160448612 Change-Id: I907476140bc174a061d48ee8e58878af64a62b29 --- .../dialer/enrichedcall/EnrichedCallManager.java | 26 +--------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'java/com/android/dialer/enrichedcall/EnrichedCallManager.java') diff --git a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java index d341b43f9..f1057be1d 100644 --- a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java +++ b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java @@ -16,7 +16,6 @@ package com.android.dialer.enrichedcall; -import android.support.annotation.IntDef; import android.support.annotation.MainThread; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -25,8 +24,6 @@ import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry; import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult; import com.android.dialer.enrichedcall.videoshare.VideoShareListener; import com.android.dialer.multimedia.MultimediaData; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import java.util.List; import java.util.Map; @@ -81,27 +78,6 @@ public interface EnrichedCallManager { @MainThread void clearCachedData(); - /** Possible states for call composer sessions. */ - @Retention(RetentionPolicy.SOURCE) - @IntDef({ - STATE_NONE, - STATE_STARTING, - STATE_STARTED, - STATE_START_FAILED, - STATE_MESSAGE_SENT, - STATE_MESSAGE_FAILED, - STATE_CLOSED, - }) - @interface State {} - - int STATE_NONE = 0; - int STATE_STARTING = STATE_NONE + 1; - int STATE_STARTED = STATE_STARTING + 1; - int STATE_START_FAILED = STATE_STARTED + 1; - int STATE_MESSAGE_SENT = STATE_START_FAILED + 1; - int STATE_MESSAGE_FAILED = STATE_MESSAGE_SENT + 1; - int STATE_CLOSED = STATE_MESSAGE_FAILED + 1; - /** * Starts a call composer session with the given remote number. * @@ -119,7 +95,7 @@ public interface EnrichedCallManager { * @param sessionId the id for the session. See {@link #startCallComposerSession(String)} * @param data the {@link MultimediaData} * @throws IllegalArgumentException if there's no open session with the given number - * @throws IllegalStateException if the session isn't in the {@link #STATE_STARTED} state + * @throws IllegalStateException if the session isn't in the {@link Session#STATE_STARTED} state */ @MainThread void sendCallComposerData(long sessionId, @NonNull MultimediaData data); -- cgit v1.2.3