diff options
| -rw-r--r-- | api/current.txt | 4 | ||||
| -rw-r--r-- | core/java/android/service/voice/VoiceInteractionService.java | 32 |
2 files changed, 1 insertions, 35 deletions
diff --git a/api/current.txt b/api/current.txt index fc86c7a975ca..6097225b8967 100644 --- a/api/current.txt +++ b/api/current.txt @@ -41827,10 +41827,6 @@ package android.service.voice { method public void showSession(android.os.Bundle, int); field public static final String SERVICE_INTERFACE = "android.service.voice.VoiceInteractionService"; field public static final String SERVICE_META_DATA = "android.voice_interaction"; - field public static final int VOICE_STATE_CONDITIONAL_LISTENING = 1; // 0x1 - field public static final int VOICE_STATE_FULFILLING = 3; // 0x3 - field public static final int VOICE_STATE_LISTENING = 2; // 0x2 - field public static final int VOICE_STATE_NONE = 0; // 0x0 } public class VoiceInteractionSession implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback { diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java index 2789651c4eaf..e76e0966b817 100644 --- a/core/java/android/service/voice/VoiceInteractionService.java +++ b/core/java/android/service/voice/VoiceInteractionService.java @@ -16,7 +16,6 @@ package android.service.voice; -import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; @@ -41,8 +40,6 @@ import com.android.internal.util.function.pooled.PooledLambda; import java.io.FileDescriptor; import java.io.PrintWriter; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; import java.util.List; import java.util.Locale; @@ -80,33 +77,6 @@ public class VoiceInteractionService extends Service { */ public static final String SERVICE_META_DATA = "android.voice_interaction"; - /** @hide */ - @Retention(RetentionPolicy.SOURCE) - @IntDef(prefix = {"VOICE_STATE_"}, value = { - VOICE_STATE_NONE, - VOICE_STATE_CONDITIONAL_LISTENING, - VOICE_STATE_LISTENING, - VOICE_STATE_FULFILLING}) - public @interface VoiceState { - } - - /** - * Voice assistant inactive. - */ - public static final int VOICE_STATE_NONE = 0; - /** - * Voice assistant listening, but will only trigger if it hears a request it can fulfill. - */ - public static final int VOICE_STATE_CONDITIONAL_LISTENING = 1; - /** - * Voice assistant is listening to user speech. - */ - public static final int VOICE_STATE_LISTENING = 2; - /** - * Voice assistant is fulfilling an action requested by the user. - */ - public static final int VOICE_STATE_FULFILLING = 3; - IVoiceInteractionService mInterface = new IVoiceInteractionService.Stub() { @Override public void ready() { @@ -376,7 +346,7 @@ public class VoiceInteractionService extends Service { * * @param state value indicating whether the assistant is listening, fulfilling, etc. */ - public final void setVoiceState(@VoiceState int state) { + public final void setVoiceState(int state) { try { mSystemService.setVoiceState(state); } catch (RemoteException e) { |