From ffeecb1bfb9b71f4b62c9ef1fbf7b58a7a63f655 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 25 Feb 2015 11:08:11 -0800 Subject: Rework voice interaction session lifecycle. We now have a formal concept of the session being shown and hidden, with it being able to continue running while hidden as long as there is enough RAM. This changes the flow that a VoiceInteractionSession will see: onCreate() is when it is first created, onCreateContentView() is when its UI first needs to be built, onShow() is called each time it needs to be shown and has the arguments given when the show request was made (which has been renamed from startSession to showSession), and then onHide() will be called when the UI is no longer shown. The methods show() and hide() now allow a VoiceInteractionSession subclass to control when it is shown and hidden, working with the shown state being maintained by the system. Change-Id: Ic4a430ec7e8bf76a5441fd0425e2932806170fcc --- .../com/android/internal/app/IVoiceInteractionManagerService.aidl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/java/com') diff --git a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl index 6d90420..8f549a6 100644 --- a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl +++ b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl @@ -26,9 +26,11 @@ import android.service.voice.IVoiceInteractionService; import android.service.voice.IVoiceInteractionSession; interface IVoiceInteractionManagerService { - void startSession(IVoiceInteractionService service, in Bundle sessionArgs, int flags); + void showSession(IVoiceInteractionService service, in Bundle sessionArgs, int flags); boolean deliverNewSession(IBinder token, IVoiceInteractionSession session, IVoiceInteractor interactor); + boolean showSessionFromSession(IBinder token, in Bundle sessionArgs, int flags); + boolean hideSessionFromSession(IBinder token); int startVoiceActivity(IBinder token, in Intent intent, String resolvedType); void finish(IBinder token); -- cgit v1.1