diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-08-06 16:40:27 -0700 |
|---|---|---|
| committer | Svetoslav Ganov <svetoslavganov@google.com> | 2012-08-06 23:49:38 -0700 |
| commit | 758143ecfedbe08cc6c4fed0ad8ad7a854194ca4 (patch) | |
| tree | c7102e7f3b5f71180cb23d1a13c01158f558feb6 /services/java/com/android/server/InputMethodManagerService.java | |
| parent | 4cb3384772cf7015a4e05789470123efb07219d9 (diff) | |
Window position not reported if the window is not moved.
1.If a window is shown but never moved the window window
is never notified for its current location. Therefore,
accessibility nodes do not contain correct bounds in
screen coordinates.
bug:6926295
Change-Id: I7df18b095d33ecafffced75aba9e4f4693b0c393
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
| -rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 1e39492103bc..747cf0bf33d1 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -17,6 +17,7 @@ package com.android.server; import com.android.internal.content.PackageMonitor; import com.android.internal.os.HandlerCaller; +import com.android.internal.os.SomeArgs; import com.android.internal.util.FastXmlSerializer; import com.android.internal.view.IInputContext; import com.android.internal.view.IInputMethod; @@ -2024,7 +2025,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub @Override public boolean handleMessage(Message msg) { - HandlerCaller.SomeArgs args; + SomeArgs args; switch (msg.what) { case MSG_SHOW_IM_PICKER: showInputMethodMenu(); @@ -2035,8 +2036,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub return true; case MSG_SHOW_IM_SUBTYPE_ENABLER: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; showInputMethodAndSubtypeEnabler((String)args.arg1); + args.recycle(); return true; case MSG_SHOW_IM_CONFIG: @@ -2053,48 +2055,53 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } return true; case MSG_BIND_INPUT: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { ((IInputMethod)args.arg1).bindInput((InputBinding)args.arg2); } catch (RemoteException e) { } + args.recycle(); return true; case MSG_SHOW_SOFT_INPUT: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { ((IInputMethod)args.arg1).showSoftInput(msg.arg1, (ResultReceiver)args.arg2); } catch (RemoteException e) { } + args.recycle(); return true; case MSG_HIDE_SOFT_INPUT: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { ((IInputMethod)args.arg1).hideSoftInput(0, (ResultReceiver)args.arg2); } catch (RemoteException e) { } + args.recycle(); return true; case MSG_ATTACH_TOKEN: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { if (DEBUG) Slog.v(TAG, "Sending attach of token: " + args.arg2); ((IInputMethod)args.arg1).attachToken((IBinder)args.arg2); } catch (RemoteException e) { } + args.recycle(); return true; case MSG_CREATE_SESSION: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { ((IInputMethod)args.arg1).createSession( (IInputMethodCallback)args.arg2); } catch (RemoteException e) { } + args.recycle(); return true; // --------------------------------------------------------- case MSG_START_INPUT: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { SessionState session = (SessionState)args.arg1; setEnabledSessionInMainThread(session); @@ -2102,9 +2109,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub (EditorInfo)args.arg3); } catch (RemoteException e) { } + args.recycle(); return true; case MSG_RESTART_INPUT: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { SessionState session = (SessionState)args.arg1; setEnabledSessionInMainThread(session); @@ -2112,6 +2120,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub (EditorInfo)args.arg3); } catch (RemoteException e) { } + args.recycle(); return true; // --------------------------------------------------------- @@ -2124,13 +2133,14 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } return true; case MSG_BIND_METHOD: - args = (HandlerCaller.SomeArgs)msg.obj; + args = (SomeArgs)msg.obj; try { ((IInputMethodClient)args.arg1).onBindMethod( (InputBindResult)args.arg2); } catch (RemoteException e) { Slog.w(TAG, "Client died receiving input method " + args.arg2); } + args.recycle(); return true; case MSG_SET_ACTIVE: try { |
