diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-04-04 18:02:06 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2014-04-24 17:48:58 -0700 |
commit | 91097de49b0f683b00e26a75dbc0ac6082344137 (patch) | |
tree | 82c3185634a71233ce2e81a3645b07b1ba55f412 /core/res | |
parent | 23af77a3cd1febc740d885ff03ead09837df269c (diff) | |
download | frameworks_base-91097de49b0f683b00e26a75dbc0ac6082344137.zip frameworks_base-91097de49b0f683b00e26a75dbc0ac6082344137.tar.gz frameworks_base-91097de49b0f683b00e26a75dbc0ac6082344137.tar.bz2 |
Initial implementation of new voice interaction API.
This gives a basic working implementation of a persist
running service that can start a voice interaction when
it wants, with the target activity(s) able to go through
the protocol to interact with it. It may even work when
the screen is off by putting the activity manager in the
correct state to act like the screen is on.
Includes a sample app that is a voice interation service
and also has an activity it can launch.
Now that I have this initial implementation, I think I
want to rework some aspects of the API.
Change-Id: I7646d0af8fb4ac768c63a18fe3de43f8091f60e9
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/AndroidManifest.xml | 7 | ||||
-rw-r--r-- | core/res/res/values/attrs.xml | 10 | ||||
-rw-r--r-- | core/res/res/values/strings.xml | 6 |
3 files changed, 22 insertions, 1 deletions
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 57e845f..8dfce64 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2056,6 +2056,13 @@ android:description="@string/permdesc_bindWallpaper" android:protectionLevel="signature|system" /> + <!-- Must be required by a {@link android.service.voice.VoiceInteractionService}, + to ensure that only the system can bind to it. --> + <permission android:name="android.permission.BIND_VOICE_INTERACTION" + android:label="@string/permlab_bindVoiceInteraction" + android:description="@string/permdesc_bindVoiceInteraction" + android:protectionLevel="signature" /> + <!-- Must be required by a {@link com.android.media.remotedisplay.RemoteDisplayProvider}, to ensure that only the system can bind to it. @hide --> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 508a557..326485d 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -6267,13 +6267,21 @@ </declare-styleable> <!-- Use <code>recognition-service</code> as the root tag of the XML resource that - describes a {@link android.speech.RecognitionService}, which is reference from + describes a {@link android.speech.RecognitionService}, which is referenced from its {@link android.speech.RecognitionService#SERVICE_META_DATA} meta-data entry. Described here are the attributes that can be included in that tag. --> <declare-styleable name="RecognitionService"> <attr name="settingsActivity" /> </declare-styleable> + <!-- Use <code>voice-interaction-service</code> as the root tag of the XML resource that + describes a {@link android.service.voice.VoiceInteractionService}, which is referenced from + its {@link android.service.voice.VoiceInteractionService#SERVICE_META_DATA} meta-data entry. + Described here are the attributes that can be included in that tag. --> + <declare-styleable name="VoiceInteractionService"> + <attr name="settingsActivity" /> + </declare-styleable> + <!-- Attributes used to style the Action Bar. --> <declare-styleable name="ActionBar"> <!-- The type of navigation to use. --> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 6d4ceef..9b89eaa 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1068,6 +1068,12 @@ interface of a wallpaper. Should never be needed for normal apps.</string> <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> + <string name="permlab_bindVoiceInteraction">bind to a voice interactor</string> + <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> + <string name="permdesc_bindVoiceInteraction">Allows the holder to bind to the top-level + interface of a voice interaction service. Should never be needed for normal apps.</string> + + <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permlab_bindRemoteDisplay">bind to a remote display</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permdesc_bindRemoteDisplay">Allows the holder to bind to the top-level |