summaryrefslogtreecommitdiffstats
path: root/core/java/android/service/voice
diff options
context:
space:
mode:
authorDharmesh Mokani <mokani@google.com>2014-09-04 12:50:43 -0700
committerDharmesh Mokani <mokani@google.com>2014-09-04 16:43:17 -0700
commitae686a51288031271685861436f7c67201791d09 (patch)
tree498e92bc79e8d0ce9575ff20da0e2f9f7ab478ac /core/java/android/service/voice
parent70afe9ee84a41fda72f898716da8485e8dd419d9 (diff)
downloadframeworks_base-ae686a51288031271685861436f7c67201791d09.zip
frameworks_base-ae686a51288031271685861436f7c67201791d09.tar.gz
frameworks_base-ae686a51288031271685861436f7c67201791d09.tar.bz2
Address API review comment:AlwaysOnHotwordDetector
- Methods creating an Intent should be named createFooIntent Bug: 17389896 Change-Id: Icb9c9f9ca3a41fca09f79ff22b99988a1ded331f
Diffstat (limited to 'core/java/android/service/voice')
-rw-r--r--core/java/android/service/voice/AlwaysOnHotwordDetector.java41
1 files changed, 40 insertions, 1 deletions
diff --git a/core/java/android/service/voice/AlwaysOnHotwordDetector.java b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
index 519bc28..4de5f41 100644
--- a/core/java/android/service/voice/AlwaysOnHotwordDetector.java
+++ b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
@@ -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.
@@ -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) {
@@ -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) {
@@ -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) {