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

Commit 2691d08c authored by Barnaby James's avatar Barnaby James Committed by Android Git Automerger
Browse files

am c1e3ac32: Merge "Minor doc fixes for VoiceInteractor." into mnc-dev

* commit 'c1e3ac32':
  Minor doc fixes for VoiceInteractor.
parents b41e36ba c1e3ac32
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -5430,7 +5430,6 @@ package android.app {
  public static class VoiceInteractor.AbortVoiceRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.AbortVoiceRequest(android.app.VoiceInteractor.Prompt, android.os.Bundle);
    ctor public deprecated VoiceInteractor.AbortVoiceRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onAbortResult(android.os.Bundle);
  }
@@ -5441,24 +5440,20 @@ package android.app {
  public static class VoiceInteractor.CompleteVoiceRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.CompleteVoiceRequest(android.app.VoiceInteractor.Prompt, android.os.Bundle);
    ctor public deprecated VoiceInteractor.CompleteVoiceRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onCompleteResult(android.os.Bundle);
  }
  public static class VoiceInteractor.ConfirmationRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.ConfirmationRequest(android.app.VoiceInteractor.Prompt, android.os.Bundle);
    ctor public deprecated VoiceInteractor.ConfirmationRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onConfirmationResult(boolean, android.os.Bundle);
  }
  public static class VoiceInteractor.PickOptionRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.PickOptionRequest(android.app.VoiceInteractor.Prompt, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    ctor public deprecated VoiceInteractor.PickOptionRequest(java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }
  public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable {
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence);
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence, int);
    method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence);
    method public int countSynonyms();
+0 −5
Original line number Diff line number Diff line
@@ -5546,7 +5546,6 @@ package android.app {
  public static class VoiceInteractor.AbortVoiceRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.AbortVoiceRequest(android.app.VoiceInteractor.Prompt, android.os.Bundle);
    ctor public deprecated VoiceInteractor.AbortVoiceRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onAbortResult(android.os.Bundle);
  }
@@ -5557,24 +5556,20 @@ package android.app {
  public static class VoiceInteractor.CompleteVoiceRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.CompleteVoiceRequest(android.app.VoiceInteractor.Prompt, android.os.Bundle);
    ctor public deprecated VoiceInteractor.CompleteVoiceRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onCompleteResult(android.os.Bundle);
  }
  public static class VoiceInteractor.ConfirmationRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.ConfirmationRequest(android.app.VoiceInteractor.Prompt, android.os.Bundle);
    ctor public deprecated VoiceInteractor.ConfirmationRequest(java.lang.CharSequence, android.os.Bundle);
    method public void onConfirmationResult(boolean, android.os.Bundle);
  }
  public static class VoiceInteractor.PickOptionRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.PickOptionRequest(android.app.VoiceInteractor.Prompt, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    ctor public deprecated VoiceInteractor.PickOptionRequest(java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }
  public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable {
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence);
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence, int);
    method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence);
    method public int countSynonyms();
+23 −9
Original line number Diff line number Diff line
@@ -253,7 +253,8 @@ public final class VoiceInteractor {

        /**
         * Report from voice interaction service: this operation has been canceled, typically
         * as a completion of a previous call to {@link #cancel}.
         * as a completion of a previous call to {@link #cancel} or when the user explicitly
         * cancelled.
         */
        public void onCancel() {
        }
@@ -288,7 +289,8 @@ public final class VoiceInteractor {
     * would require the user to touch the screen when voice interaction mode is not enabled.
     * The result of the confirmation will be returned through an asynchronous call to
     * either {@link #onConfirmationResult(boolean, android.os.Bundle)} or
     * {@link #onCancel()}.
     * {@link #onCancel()} - these methods should be overridden to define the application specific
     *  behavior.
     *
     * <p>In some cases this may be a simple yes / no confirmation or the confirmation could
     * include context information about how the action will be completed
@@ -315,13 +317,19 @@ public final class VoiceInteractor {
         * @param prompt Optional confirmation to speak to the user or null if nothing
         *     should be spoken.
         * @param extras Additional optional information or null.
         * @deprecated Prefer the version that takes a {@link Prompt}.
         * @hide
         */
        public ConfirmationRequest(CharSequence prompt, Bundle extras) {
            mPrompt = (prompt != null ? new Prompt(prompt) : null);
            mExtras = extras;
        }

        /**
         * Handle the confirmation result. Override this method to define
         * the behavior when the user confirms or rejects the operation.
         * @param confirmed Whether the user confirmed or rejected the operation.
         * @param result Additional result information or null.
         */
        public void onConfirmationResult(boolean confirmed, Bundle result) {
        }

@@ -336,7 +344,8 @@ public final class VoiceInteractor {
     * VoiceInteractionService. Typically, the application would present this visually as
     * a list view to allow selecting the option by touch.
     * The result of the confirmation will be returned through an asynchronous call to
     * either {@link #onPickOptionResult} or {@link #onCancel()}.
     * either {@link #onPickOptionResult} or {@link #onCancel()} - these methods should
     * be overridden to define the application specific behavior.
     */
    public static class PickOptionRequest extends Request {
        final Prompt mPrompt;
@@ -344,7 +353,9 @@ public final class VoiceInteractor {
        final Bundle mExtras;

        /**
         * Represents a single option that the user may select using their voice.
         * Represents a single option that the user may select using their voice. The 
         * {@link #getIndex()} method should be used as a unique ID to identify the option
         * when it is returned from the voice interactor.
         */
        public static final class Option implements Parcelable {
            final CharSequence mLabel;
@@ -357,6 +368,7 @@ public final class VoiceInteractor {
             * or one of several synonyms.
             * @param label The label that will both be matched against what the user speaks
             *     and displayed visually.
             * @hide
             */
            public Option(CharSequence label) {
                mLabel = label;
@@ -481,7 +493,7 @@ public final class VoiceInteractor {
         *     presented or null if nothing should be asked.
         * @param options The set of {@link Option}s the user is selecting from.
         * @param extras Additional optional information or null.
         * @deprecated Prefer the version that takes a {@link Prompt}.
         * @hide
         */
        public PickOptionRequest(CharSequence prompt, Option[] options, Bundle extras) {
            mPrompt = (prompt != null ? new Prompt(prompt) : null);
@@ -490,7 +502,9 @@ public final class VoiceInteractor {
        }

        /**
         * Called when a single option is confirmed or narrowed to one of several options.
         * Called when a single option is confirmed or narrowed to one of several options. Override
         * this method to define the behavior when the user selects an option or narrows down the
         * set of options.
         * @param finished True if the voice interaction has finished making a selection, in
         *     which case {@code selections} contains the final result.  If false, this request is
         *     still active and you will continue to get calls on it.
@@ -536,7 +550,7 @@ public final class VoiceInteractor {
         * @param message Optional message to speak to the user about the completion status of
         *     the task or null if nothing should be spoken.
         * @param extras Additional optional information or null.
         * @deprecated Prefer the version that takes a {@link Prompt}.
         * @hide
         */
        public CompleteVoiceRequest(CharSequence message, Bundle extras) {
            mPrompt = (message != null ? new Prompt(message) : null);
@@ -583,7 +597,7 @@ public final class VoiceInteractor {
         * @param message Optional message to speak to the user indicating why the task could
         *     not be completed by voice or null if nothing should be spoken.
         * @param extras Additional optional information or null.
         * @deprecated Prefer the version that takes a {@link Prompt}.
         * @hide
         */
        public AbortVoiceRequest(CharSequence message, Bundle extras) {
            mPrompt = (message != null ? new Prompt(message) : null);