From 20d94749043d0851f1da10c7749fd7eb13a35081 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 29 May 2014 18:35:45 -0700 Subject: 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 --- core/java/android/inputmethodservice/IInputMethodWrapper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/java/android/inputmethodservice/IInputMethodWrapper.java') diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java index 06d8e4a8cb2e..857e3357e133 100644 --- a/core/java/android/inputmethodservice/IInputMethodWrapper.java +++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java @@ -69,6 +69,7 @@ class IInputMethodWrapper extends IInputMethod.Stub private static final int DO_CHANGE_INPUTMETHOD_SUBTYPE = 80; final WeakReference mTarget; + final Context mContext; final HandlerCaller mCaller; final WeakReference mInputMethod; final int mTargetSdkVersion; @@ -111,8 +112,8 @@ class IInputMethodWrapper extends IInputMethod.Stub public IInputMethodWrapper(AbstractInputMethodService context, InputMethod inputMethod) { mTarget = new WeakReference(context); - mCaller = new HandlerCaller(context.getApplicationContext(), null, - this, true /*asyncHandler*/); + mContext = context.getApplicationContext(); + mCaller = new HandlerCaller(mContext, null, this, true /*asyncHandler*/); mInputMethod = new WeakReference(inputMethod); mTargetSdkVersion = context.getApplicationInfo().targetSdkVersion; } @@ -186,7 +187,7 @@ class IInputMethodWrapper extends IInputMethod.Stub case DO_CREATE_SESSION: { SomeArgs args = (SomeArgs)msg.obj; inputMethod.createSession(new InputMethodSessionCallbackWrapper( - mCaller.mContext, (InputChannel)args.arg1, + mContext, (InputChannel)args.arg1, (IInputSessionCallback)args.arg2)); args.recycle(); return; -- cgit v1.2.3