summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-08-29 17:32:04 -0700
committerDianne Hackborn <hackbod@google.com>2014-09-02 10:29:28 -0700
commitd7c0395d26694c594c3e64b16ab647c971aeb422 (patch)
tree14e3e6765760116dc6e95607702e226ff99bd676 /core/java/android/app
parent78358b17885cfb99f359f54c11565c0c3a998928 (diff)
downloadframeworks_base-d7c0395d26694c594c3e64b16ab647c971aeb422.zip
frameworks_base-d7c0395d26694c594c3e64b16ab647c971aeb422.tar.gz
frameworks_base-d7c0395d26694c594c3e64b16ab647c971aeb422.tar.bz2
Hide the interaction part of VoiceInteractionService.
Also the ability to start voice activities is turned off, though for testing purposes it can be turned back on with a system property. Change-Id: I867704d32c53beeb851ceea9b45c28bf5c01ef61
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/Activity.java4
-rw-r--r--core/java/android/app/VoiceInteractor.java3
2 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 2503d17..8ab344e 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1236,18 +1236,22 @@ public class Activity extends ContextThemeWrapper
}
/**
+ * @hide
* Check whether this activity is running as part of a voice interaction with the user.
* If true, it should perform its interaction with the user through the
* {@link VoiceInteractor} returned by {@link #getVoiceInteractor}.
*/
+ @SystemApi
public boolean isVoiceInteraction() {
return mVoiceInteractor != null;
}
/**
+ * @hide
* Retrieve the active {@link VoiceInteractor} that the user is going through to
* interact with this activity.
*/
+ @SystemApi
public VoiceInteractor getVoiceInteractor() {
return mVoiceInteractor;
}
diff --git a/core/java/android/app/VoiceInteractor.java b/core/java/android/app/VoiceInteractor.java
index dcdfd78..723cb9b 100644
--- a/core/java/android/app/VoiceInteractor.java
+++ b/core/java/android/app/VoiceInteractor.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.SystemApi;
import android.content.Context;
import android.os.Bundle;
import android.os.IBinder;
@@ -33,6 +34,7 @@ import com.android.internal.os.SomeArgs;
import java.util.ArrayList;
/**
+ * @hide
* Interface for an {@link Activity} to interact with the user through voice. Use
* {@link android.app.Activity#getVoiceInteractor() Activity.getVoiceInteractor}
* to retrieve the interface, if the activity is currently involved in a voice interaction.
@@ -54,6 +56,7 @@ import java.util.ArrayList;
* request, rather than holding on to the activity instance yourself, either explicitly
* or implicitly through a non-static inner class.
*/
+@SystemApi
public class VoiceInteractor {
static final String TAG = "VoiceInteractor";
static final boolean DEBUG = true;