summaryrefslogtreecommitdiff
path: root/tests/VoiceInteraction
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2016-04-08 15:28:47 -0700
committerAmith Yamasani <yamasani@google.com>2016-04-13 17:12:29 -0700
commite8222e551f8abd2d82ca4f77ddb275e2e509751e (patch)
tree3e5e3310551590db05eb91b555636a59db739d03 /tests/VoiceInteraction
parentbdae9296be975758e33579f85eaded83bc30c402 (diff)
Multi-window assist callback
Introducing a new callback in VoiceInteractionSession to provide assist data for additional activities in the foreground in a multiwindow setup. PIP, docked windows and free-form windows (top-most) will be queried for assist data and passed through the new API to the Voice Interaction service. Bug: 27718385 Change-Id: Ib4427c304611b75c2078dcb54f1f7e47ae7d9cfa
Diffstat (limited to 'tests/VoiceInteraction')
-rw-r--r--tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
index 450334cb2d86..5767f110f0a4 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
@@ -194,6 +194,18 @@ public class MainInteractionSession extends VoiceInteractionSession
}
@Override
+ public void onHandleAssistSecondary(final Bundle data, final AssistStructure structure,
+ final AssistContent content, int index, int count) {
+ Log.i(TAG, "Got secondary activity assist data " + index + " of " + count);
+ Log.i(TAG, "Showing assist structure after a few seconds...");
+ mContentView.postDelayed(new Runnable() {
+ public void run() {
+ onHandleAssist(data, structure, content);
+ }
+ }, 2000 * index);
+ }
+
+ @Override
public void onHandleScreenshot(Bitmap screenshot) {
if (screenshot != null) {
mScreenshot.setImageBitmap(screenshot);