From dea3ef7967228f0ddcc03f2455a4f1254758e584 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 28 Oct 2010 14:24:22 -0700 Subject: Add new resize mode to not resize, new web input types. Change-Id: Ib098c03793d08532c3c099b59d0cc6b567e54900 --- core/java/android/inputmethodservice/IInputMethodWrapper.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 24ea7d2681f6..17c9ee7cdce5 100644 --- a/core/java/android/inputmethodservice/IInputMethodWrapper.java +++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java @@ -70,6 +70,7 @@ class IInputMethodWrapper extends IInputMethod.Stub final WeakReference mTarget; final HandlerCaller mCaller; final WeakReference mInputMethod; + final int mTargetSdkVersion; static class Notifier { boolean notified; @@ -102,6 +103,7 @@ class IInputMethodWrapper extends IInputMethod.Stub mTarget = new WeakReference(context); mCaller = new HandlerCaller(context.getApplicationContext(), this); mInputMethod = new WeakReference(inputMethod); + mTargetSdkVersion = context.getApplicationInfo().targetSdkVersion; } public InputMethod getInternalInputMethod() { @@ -151,7 +153,9 @@ class IInputMethodWrapper extends IInputMethod.Stub IInputContext inputContext = (IInputContext)args.arg1; InputConnection ic = inputContext != null ? new InputConnectionWrapper(inputContext) : null; - inputMethod.startInput(ic, (EditorInfo)args.arg2); + EditorInfo info = (EditorInfo)args.arg2; + info.makeCompatible(mTargetSdkVersion); + inputMethod.startInput(ic, info); return; } case DO_RESTART_INPUT: { @@ -159,7 +163,9 @@ class IInputMethodWrapper extends IInputMethod.Stub IInputContext inputContext = (IInputContext)args.arg1; InputConnection ic = inputContext != null ? new InputConnectionWrapper(inputContext) : null; - inputMethod.restartInput(ic, (EditorInfo)args.arg2); + EditorInfo info = (EditorInfo)args.arg2; + info.makeCompatible(mTargetSdkVersion); + inputMethod.restartInput(ic, info); return; } case DO_CREATE_SESSION: { -- cgit v1.2.3