From 19695d97118d74aa7f54ba09b178e65378825cc0 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Mon, 20 Jul 2015 15:51:40 -0700 Subject: Add callback to voice interaction session for lockscreen shown Bug: 22402726 Change-Id: Iaf83e2f2b0389d74b6ecf480aa91a34443803f7b --- .../src/com/android/test/assist/AssistInteractionSession.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java b/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java index 43f1e32..851bda9 100644 --- a/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java +++ b/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java @@ -24,6 +24,7 @@ import android.graphics.Color; import android.os.Bundle; import android.os.Handler; import android.service.voice.VoiceInteractionSession; +import android.util.Log; import android.view.View; import android.view.ViewAnimationUtils; import android.view.ViewTreeObserver; @@ -69,6 +70,7 @@ public class AssistInteractionSession extends VoiceInteractionSession { @Override public void onCreate() { + super.onCreate(); // Simulate slowness of Assist app try { Thread.sleep(1000); @@ -105,6 +107,12 @@ public class AssistInteractionSession extends VoiceInteractionSession { } } + @Override + public void onLockscreenShown() { + super.onLockscreenShown(); + Log.i("Assistant", "Lockscreen was shown"); + } + private void playAssistAnimation() { Interpolator linearOutSlowIn = AnimationUtils.loadInterpolator(mBackground.getContext(), android.R.interpolator.linear_out_slow_in); -- cgit v1.1