Loading api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -27177,9 +27177,9 @@ package android.service.textservice { package android.service.voice { public class AlwaysOnHotwordDetector { method public android.content.Intent createIntentToEnroll(); method public android.content.Intent createIntentToReEnroll(); method public android.content.Intent createIntentToUnEnroll(); method public android.content.Intent createEnrollIntent(); method public android.content.Intent createReEnrollIntent(); method public android.content.Intent createUnEnrollIntent(); method public int getSupportedRecognitionModes(); method public boolean startRecognition(int); method public boolean stopRecognition(); core/java/android/service/voice/AlwaysOnHotwordDetector.java +40 −1 Original line number Diff line number Diff line Loading @@ -450,7 +450,7 @@ public class AlwaysOnHotwordDetector { * This intent must be invoked using {@link Activity#startActivityForResult(Intent, int)}. * Starting re-enrollment is only valid if the keyphrase is un-enrolled, * i.e. {@link #STATE_KEYPHRASE_UNENROLLED}, * otherwise {@link #createIntentToReEnroll()} should be preferred. * otherwise {@link #createReEnrollIntent()} should be preferred. * * @return An {@link Intent} to start enrollment for the given keyphrase. * @throws UnsupportedOperationException if managing they keyphrase isn't supported. Loading @@ -460,6 +460,19 @@ public class AlwaysOnHotwordDetector { * This may happen if another detector has been instantiated or the * {@link VoiceInteractionService} hosting this detector has been shut down. */ public Intent createEnrollIntent() { if (DBG) Slog.d(TAG, "createEnrollIntent"); synchronized (mLock) { return getManageIntentLocked(MANAGE_ACTION_ENROLL); } } /** * FIXME: Remove once the prebuilts are updated. * * @hide */ @Deprecated public Intent createIntentToEnroll() { if (DBG) Slog.d(TAG, "createIntentToEnroll"); synchronized (mLock) { Loading @@ -481,6 +494,19 @@ public class AlwaysOnHotwordDetector { * This may happen if another detector has been instantiated or the * {@link VoiceInteractionService} hosting this detector has been shut down. */ public Intent createUnEnrollIntent() { if (DBG) Slog.d(TAG, "createUnEnrollIntent"); synchronized (mLock) { return getManageIntentLocked(MANAGE_ACTION_UN_ENROLL); } } /** * FIXME: Remove once the prebuilts are updated. * * @hide */ @Deprecated public Intent createIntentToUnEnroll() { if (DBG) Slog.d(TAG, "createIntentToUnEnroll"); synchronized (mLock) { Loading @@ -502,6 +528,19 @@ public class AlwaysOnHotwordDetector { * This may happen if another detector has been instantiated or the * {@link VoiceInteractionService} hosting this detector has been shut down. */ public Intent createReEnrollIntent() { if (DBG) Slog.d(TAG, "createReEnrollIntent"); synchronized (mLock) { return getManageIntentLocked(MANAGE_ACTION_RE_ENROLL); } } /** * FIXME: Remove once the prebuilts are updated. * * @hide */ @Deprecated public Intent createIntentToReEnroll() { if (DBG) Slog.d(TAG, "createIntentToReEnroll"); synchronized (mLock) { Loading tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public class MainInteractionService extends VoiceInteractionService { break; case AlwaysOnHotwordDetector.STATE_KEYPHRASE_UNENROLLED: Log.i(TAG, "STATE_KEYPHRASE_UNENROLLED"); Intent enroll = mHotwordDetector.createIntentToEnroll(); Intent enroll = mHotwordDetector.createEnrollIntent(); Log.i(TAG, "Need to enroll with " + enroll); break; case AlwaysOnHotwordDetector.STATE_KEYPHRASE_ENROLLED: Loading Loading
api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -27177,9 +27177,9 @@ package android.service.textservice { package android.service.voice { public class AlwaysOnHotwordDetector { method public android.content.Intent createIntentToEnroll(); method public android.content.Intent createIntentToReEnroll(); method public android.content.Intent createIntentToUnEnroll(); method public android.content.Intent createEnrollIntent(); method public android.content.Intent createReEnrollIntent(); method public android.content.Intent createUnEnrollIntent(); method public int getSupportedRecognitionModes(); method public boolean startRecognition(int); method public boolean stopRecognition();
core/java/android/service/voice/AlwaysOnHotwordDetector.java +40 −1 Original line number Diff line number Diff line Loading @@ -450,7 +450,7 @@ public class AlwaysOnHotwordDetector { * This intent must be invoked using {@link Activity#startActivityForResult(Intent, int)}. * Starting re-enrollment is only valid if the keyphrase is un-enrolled, * i.e. {@link #STATE_KEYPHRASE_UNENROLLED}, * otherwise {@link #createIntentToReEnroll()} should be preferred. * otherwise {@link #createReEnrollIntent()} should be preferred. * * @return An {@link Intent} to start enrollment for the given keyphrase. * @throws UnsupportedOperationException if managing they keyphrase isn't supported. Loading @@ -460,6 +460,19 @@ public class AlwaysOnHotwordDetector { * This may happen if another detector has been instantiated or the * {@link VoiceInteractionService} hosting this detector has been shut down. */ public Intent createEnrollIntent() { if (DBG) Slog.d(TAG, "createEnrollIntent"); synchronized (mLock) { return getManageIntentLocked(MANAGE_ACTION_ENROLL); } } /** * FIXME: Remove once the prebuilts are updated. * * @hide */ @Deprecated public Intent createIntentToEnroll() { if (DBG) Slog.d(TAG, "createIntentToEnroll"); synchronized (mLock) { Loading @@ -481,6 +494,19 @@ public class AlwaysOnHotwordDetector { * This may happen if another detector has been instantiated or the * {@link VoiceInteractionService} hosting this detector has been shut down. */ public Intent createUnEnrollIntent() { if (DBG) Slog.d(TAG, "createUnEnrollIntent"); synchronized (mLock) { return getManageIntentLocked(MANAGE_ACTION_UN_ENROLL); } } /** * FIXME: Remove once the prebuilts are updated. * * @hide */ @Deprecated public Intent createIntentToUnEnroll() { if (DBG) Slog.d(TAG, "createIntentToUnEnroll"); synchronized (mLock) { Loading @@ -502,6 +528,19 @@ public class AlwaysOnHotwordDetector { * This may happen if another detector has been instantiated or the * {@link VoiceInteractionService} hosting this detector has been shut down. */ public Intent createReEnrollIntent() { if (DBG) Slog.d(TAG, "createReEnrollIntent"); synchronized (mLock) { return getManageIntentLocked(MANAGE_ACTION_RE_ENROLL); } } /** * FIXME: Remove once the prebuilts are updated. * * @hide */ @Deprecated public Intent createIntentToReEnroll() { if (DBG) Slog.d(TAG, "createIntentToReEnroll"); synchronized (mLock) { Loading
tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public class MainInteractionService extends VoiceInteractionService { break; case AlwaysOnHotwordDetector.STATE_KEYPHRASE_UNENROLLED: Log.i(TAG, "STATE_KEYPHRASE_UNENROLLED"); Intent enroll = mHotwordDetector.createIntentToEnroll(); Intent enroll = mHotwordDetector.createEnrollIntent(); Log.i(TAG, "Need to enroll with " + enroll); break; case AlwaysOnHotwordDetector.STATE_KEYPHRASE_ENROLLED: Loading