summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/system-current.txt2
-rw-r--r--core/java/android/app/wearable/WearableSensingManager.java10
-rw-r--r--core/java/android/service/voice/AlwaysOnHotwordDetector.java14
-rw-r--r--core/java/android/service/voice/HotwordDetectionService.java13
4 files changed, 16 insertions, 23 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 1718452548b3..a4046cfc4bbe 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -3346,7 +3346,7 @@ package android.app.wearable {
field public static final int STATUS_SERVICE_UNAVAILABLE = 3; // 0x3
field public static final int STATUS_SUCCESS = 1; // 0x1
field public static final int STATUS_UNKNOWN = 0; // 0x0
- field public static final int STATUS_UNSUPPORTED = 2; // 0x2
+ field @Deprecated public static final int STATUS_UNSUPPORTED = 2; // 0x2
field @FlaggedApi("android.app.wearable.enable_data_request_observer_api") public static final int STATUS_UNSUPPORTED_DATA_TYPE = 8; // 0x8
field @FlaggedApi("android.app.wearable.enable_unsupported_operation_status_code") public static final int STATUS_UNSUPPORTED_OPERATION = 6; // 0x6
field public static final int STATUS_WEARABLE_UNAVAILABLE = 4; // 0x4
diff --git a/core/java/android/app/wearable/WearableSensingManager.java b/core/java/android/app/wearable/WearableSensingManager.java
index fd72c491bf16..9573e6f940b4 100644
--- a/core/java/android/app/wearable/WearableSensingManager.java
+++ b/core/java/android/app/wearable/WearableSensingManager.java
@@ -95,11 +95,12 @@ public class WearableSensingManager {
/**
* The value of the status code that indicates one or more of the requested events are not
* supported.
+ *
+ * @deprecated WearableSensingManager does not deal with events. Use {@link
+ * STATUS_UNSUPPORTED_OPERATION} instead for operations not supported by the implementation of
+ * {@link WearableSensingService}.
*/
- // TODO(b/324635656): Deprecate this status code. Update Javadoc:
- // @deprecated WearableSensingManager does not deal with events. Use {@link
- // STATUS_UNSUPPORTED_OPERATION} instead for operations not supported by the implementation of
- // {@link WearableSensingService}.
+ @Deprecated
public static final int STATUS_UNSUPPORTED = 2;
/**
@@ -121,7 +122,6 @@ public class WearableSensingManager {
* The value of the status code that indicates the method called is not supported by the
* implementation of {@link WearableSensingService}.
*/
-
@FlaggedApi(Flags.FLAG_ENABLE_UNSUPPORTED_OPERATION_STATUS_CODE)
public static final int STATUS_UNSUPPORTED_OPERATION = 6;
diff --git a/core/java/android/service/voice/AlwaysOnHotwordDetector.java b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
index a08264e625df..ccc17ecccbf9 100644
--- a/core/java/android/service/voice/AlwaysOnHotwordDetector.java
+++ b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
@@ -819,19 +819,15 @@ public class AlwaysOnHotwordDetector extends AbstractDetector {
/**
* Called when the keyphrase is spoken.
*
- * <p>This implicitly stops listening for the keyphrase once it's detected. Clients should
- * start a recognition again once they are done handling this detection.
+ * <p>If {@code eventPayload.isRecognitionStopped()} returns true, this implicitly stops
+ * listening for the keyphrase once it's detected. Clients should start a recognition again
+ * once they are done handling this detection.
*
* @param eventPayload Payload data for the detection event. This may contain the trigger
* audio, if requested when calling {@link
- * AlwaysOnHotwordDetector#startRecognition(int)}.
+ * AlwaysOnHotwordDetector#startRecognition(int)} or if the audio comes from the {@link
+ * android.service.wearable.WearableSensingService}.
*/
- // TODO(b/324635656): Update Javadoc for 24Q3 release:
- // 1. Prepend to the first paragraph:
- // If {@code eventPayload.isRecognitionStopped()} returns true, this...
- // 2. Append to the description for @param eventPayload:
- // ...or if the audio comes from {@link
- // android.service.wearable.WearableSensingService}.
public abstract void onDetected(@NonNull EventPayload eventPayload);
/**
diff --git a/core/java/android/service/voice/HotwordDetectionService.java b/core/java/android/service/voice/HotwordDetectionService.java
index 60e9de72f154..937aecc8d718 100644
--- a/core/java/android/service/voice/HotwordDetectionService.java
+++ b/core/java/android/service/voice/HotwordDetectionService.java
@@ -363,9 +363,11 @@ public abstract class HotwordDetectionService extends Service
* {@link HotwordDetector#startRecognition(ParcelFileDescriptor, AudioFormat,
* PersistableBundle)} run} hotword recognition on audio coming from an external connected
* microphone.
- * <p>
- * Upon invoking the {@code callback}, the system closes {@code audioStream} and sends the
- * detection result to the {@link HotwordDetector.Callback hotword detector}.
+ *
+ * <p>Upon invoking the {@code callback}, the system will send the detection result to
+ * the {@link HotwordDetector}'s callback. If {@code
+ * options.getBoolean(KEY_SYSTEM_WILL_CLOSE_AUDIO_STREAM_AFTER_CALLBACK, true)} returns true,
+ * the system will also close the {@code audioStream} after {@code callback} is invoked.
*
* @param audioStream Stream containing audio bytes returned from a microphone
* @param audioFormat Format of the supplied audio
@@ -375,11 +377,6 @@ public abstract class HotwordDetectionService extends Service
* PersistableBundle)}.
* @param callback The callback to use for responding to the detection request.
*/
- // TODO(b/324635656): Update Javadoc for 24Q3 release. Change the last paragraph to:
- // <p>Upon invoking the {@code callback}, the system will send the detection result to
- // the {@link HotwordDetector}'s callback. If {@code
- // options.getBoolean(KEY_SYSTEM_WILL_CLOSE_AUDIO_STREAM_AFTER_CALLBACK, true)} returns true,
- // the system will also close the {@code audioStream} after {@code callback} is invoked.
public void onDetect(
@NonNull ParcelFileDescriptor audioStream,
@NonNull AudioFormat audioFormat,