summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-06-04 16:56:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-04 16:56:52 +0000
commitb0a5e78fc06aeb67ac1f55832c9ceef5f92a0807 (patch)
tree310f16ba5e22eec96820b6d8f0945d789a3d7ca6 /tests
parent52999685178656caba37fa0e9055ac26d707bdce (diff)
parent69c6adc96eecfde74ceb83cf9177428dc08b6067 (diff)
downloadframeworks_base-b0a5e78fc06aeb67ac1f55832c9ceef5f92a0807.zip
frameworks_base-b0a5e78fc06aeb67ac1f55832c9ceef5f92a0807.tar.gz
frameworks_base-b0a5e78fc06aeb67ac1f55832c9ceef5f92a0807.tar.bz2
Merge "More API changes." into mnc-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java29
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
index f66a9ce..dae1ac3 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionSession.java
@@ -17,9 +17,9 @@
package com.android.test.voiceinteraction;
import android.app.ActivityManager;
+import android.app.VoiceInteractor;
import android.app.AssistContent;
import android.app.AssistStructure;
-import android.app.VoiceInteractor;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
@@ -71,7 +71,7 @@ public class MainInteractionSession extends VoiceInteractionSession
public void onCreate(Bundle args, int startFlags) {
super.onCreate(args, startFlags);
ActivityManager am = getContext().getSystemService(ActivityManager.class);
- am.setWatchHeapLimit(40*1024*1024);
+ am.setWatchHeapLimit(40 * 1024 * 1024);
}
@Override
@@ -118,6 +118,30 @@ public class MainInteractionSession extends VoiceInteractionSession
return mContentView;
}
+ public void onHandleAssist(Bundle assistBundle) {
+ if (assistBundle != null) {
+ Bundle assistContext = assistBundle.getBundle(Intent.EXTRA_ASSIST_CONTEXT);
+ if (assistContext != null) {
+ mAssistStructure = AssistStructure.getAssistStructure(assistContext);
+ if (mAssistStructure != null) {
+ if (mAssistVisualizer != null) {
+ mAssistVisualizer.setAssistStructure(mAssistStructure);
+ }
+ }
+ AssistContent content = AssistContent.getAssistContent(assistContext);
+ if (content != null) {
+ Log.i(TAG, "Assist intent: " + content.getIntent());
+ Log.i(TAG, "Assist clipdata: " + content.getClipData());
+ }
+ return;
+ }
+ }
+ if (mAssistVisualizer != null) {
+ mAssistVisualizer.clearAssistData();
+ }
+ }
+
+ /*
@Override
public void onHandleAssist(Bundle data, AssistStructure structure, AssistContent content) {
mAssistStructure = structure;
@@ -131,6 +155,7 @@ public class MainInteractionSession extends VoiceInteractionSession
Log.i(TAG, "Assist clipdata: " + content.getClipData());
}
}
+ */
@Override
public void onHandleScreenshot(Bitmap screenshot) {