Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f984e58c authored by Matt Casey's avatar Matt Casey Committed by Android (Google) Code Review
Browse files

Merge "Remove enumerated voice states."

parents 71f12a30 9ff477a9
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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 {
+1 −31
Original line number Diff line number Diff line
@@ -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) {