summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matt Casey <mrcasey@google.com> 2019-01-30 23:26:07 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-01-30 23:26:07 +0000
commitf984e58cc8b9f59473f69a9f0a130b2d8897258a (patch)
treef95d8796884594cec8e757fd656049a446ece34f
parent71f12a309314c6ac36404c0bac556ba9dbf8fa61 (diff)
parent9ff477a9c7b9e29eecc2d2886c5a3d6d74d037a0 (diff)
Merge "Remove enumerated voice states."
-rw-r--r--api/current.txt4
-rw-r--r--core/java/android/service/voice/VoiceInteractionService.java32
2 files changed, 1 insertions, 35 deletions
diff --git a/api/current.txt b/api/current.txt
index 200177c0290f..5bc91313638f 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -41885,10 +41885,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) {