diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-05-29 18:35:45 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2014-05-30 10:06:16 -0700 |
commit | 20d94749043d0851f1da10c7749fd7eb13a35081 (patch) | |
tree | fe14d454373789e1b28d52811b65aaaa572688e2 /tests/VoiceInteraction | |
parent | 5286624b648c7d7cc4c15813f9921c1d0b2e46cc (diff) | |
download | frameworks_base-20d94749043d0851f1da10c7749fd7eb13a35081.zip frameworks_base-20d94749043d0851f1da10c7749fd7eb13a35081.tar.gz frameworks_base-20d94749043d0851f1da10c7749fd7eb13a35081.tar.bz2 |
More work on voice interaction visuals.
There is now a special theme for voice interaction activities
to use, so they can be a panel that is better intergrated with
the rest of the voice interaction experience. This is still
not completely working, I have some hacks in the demo app to
get it right; I'll fix that in a future change.
Also improve VoiceInteractor to be retained across activity
instances, for things like rotation.
And bump up the number of concurrent broadcasts that are allowed
on non-svelte devices, since they can handle more and this makes
the boot experience better when dispatching BOOT_COMPLETED.
Change-Id: Ie86b5fd09b928da20d645ec2200577dee3e6889d
Diffstat (limited to 'tests/VoiceInteraction')
-rw-r--r-- | tests/VoiceInteraction/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/VoiceInteraction/AndroidManifest.xml b/tests/VoiceInteraction/AndroidManifest.xml index 2d08163..e1a5854 100644 --- a/tests/VoiceInteraction/AndroidManifest.xml +++ b/tests/VoiceInteraction/AndroidManifest.xml @@ -23,7 +23,8 @@ android:permission="android.permission.BIND_VOICE_INTERACTION" android:process=":session"> </service> - <activity android:name="TestInteractionActivity" android:label="Voice Interaction Target"> + <activity android:name="TestInteractionActivity" android:label="Voice Interaction Target" + android:theme="@android:style/Theme.Quantum.Light.Voice"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java index 9c772ff..a61e0da 100644 --- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java +++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java @@ -20,6 +20,8 @@ import android.app.Activity; import android.app.VoiceInteractor; import android.os.Bundle; import android.util.Log; +import android.view.Gravity; +import android.view.ViewGroup; public class TestInteractionActivity extends Activity { static final String TAG = "TestInteractionActivity"; @@ -38,6 +40,11 @@ public class TestInteractionActivity extends Activity { setContentView(R.layout.test_interaction); + // Framework should take care of these. + getWindow().setGravity(Gravity.TOP); + getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.WRAP_CONTENT); + mInteractor = getVoiceInteractor(); VoiceInteractor.ConfirmationRequest req = new VoiceInteractor.ConfirmationRequest( "This is a confirmation", null) { |