am 4bf6eb17: Merge "Memory leak in IInputMethodSessionWrapper executeMessage"
* commit '4bf6eb1775649a803efcc6da8f06e5083ed24f34': Memory leak in IInputMethodSessionWrapper executeMessage
This commit is contained in:
@@ -75,7 +75,15 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub
|
|||||||
@Override
|
@Override
|
||||||
public void executeMessage(Message msg) {
|
public void executeMessage(Message msg) {
|
||||||
if (mInputMethodSession == null) {
|
if (mInputMethodSession == null) {
|
||||||
// The session has been finished.
|
// The session has been finished. Args needs to be recycled
|
||||||
|
// for cases below.
|
||||||
|
switch (msg.what) {
|
||||||
|
case DO_UPDATE_SELECTION:
|
||||||
|
case DO_APP_PRIVATE_COMMAND: {
|
||||||
|
SomeArgs args = (SomeArgs)msg.obj;
|
||||||
|
args.recycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user