Commit 52a53526 authored by Michael Wright's avatar Michael Wright

Separate sessionCreated and finishedEvents callbacks

Bug: 8276952
Change-Id: If7051086c060fcce5d1e958ebbddec0784c851da
parent 95ae9429
......@@ -199,6 +199,7 @@ LOCAL_SRC_FILES += \
core/java/com/android/internal/view/IInputMethodClient.aidl \
core/java/com/android/internal/view/IInputMethodManager.aidl \
core/java/com/android/internal/view/IInputMethodSession.aidl \
core/java/com/android/internal/view/IInputSessionCallback.aidl \
core/java/com/android/internal/widget/ILockSettings.aidl \
core/java/com/android/internal/widget/IRemoteViewsFactory.aidl \
core/java/com/android/internal/widget/IRemoteViewsAdapterConnection.aidl \
......
......@@ -156,6 +156,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/librtp_jni.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/system/lib/librtp_jni.so)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/telephony/java/com/android/internal/telephony/SmsRawData.*)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/com/android/internal/view/IInputMethodCallback.*)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
......@@ -20,8 +20,8 @@ import com.android.internal.os.HandlerCaller;
import com.android.internal.os.SomeArgs;
import com.android.internal.view.IInputContext;
import com.android.internal.view.IInputMethod;
import com.android.internal.view.IInputMethodCallback;
import com.android.internal.view.IInputMethodSession;
import com.android.internal.view.IInputSessionCallback;
import com.android.internal.view.InputConnectionWrapper;
import android.content.Context;
......@@ -80,8 +80,8 @@ class IInputMethodWrapper extends IInputMethod.Stub
// NOTE: we should have a cache of these.
static class InputMethodSessionCallbackWrapper implements InputMethod.SessionCallback {
final Context mContext;
final IInputMethodCallback mCb;
InputMethodSessionCallbackWrapper(Context context, IInputMethodCallback cb) {
final IInputSessionCallback mCb;
InputMethodSessionCallbackWrapper(Context context, IInputSessionCallback cb) {
mContext = context;
mCb = cb;
}
......@@ -175,7 +175,7 @@ class IInputMethodWrapper extends IInputMethod.Stub
}
case DO_CREATE_SESSION: {
inputMethod.createSession(new InputMethodSessionCallbackWrapper(
mCaller.mContext, (IInputMethodCallback)msg.obj));
mCaller.mContext, (IInputSessionCallback)msg.obj));
return;
}
case DO_SET_SESSION_ENABLED:
......@@ -249,7 +249,7 @@ class IInputMethodWrapper extends IInputMethod.Stub
inputContext, attribute));
}
public void createSession(IInputMethodCallback callback) {
public void createSession(IInputSessionCallback callback) {
mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_CREATE_SESSION, callback));
}
......
......@@ -525,11 +525,6 @@ public final class InputMethodManager {
public void finishedEvent(int seq, boolean handled) {
InputMethodManager.this.finishedEvent(seq, handled);
}
@Override
public void sessionCreated(IInputMethodSession session) {
// Stub -- not for use in the client.
}
};
InputMethodManager(IInputMethodManager service, Looper looper) {
......
......@@ -16,17 +16,14 @@
package com.android.internal.view;
import android.graphics.Rect;
import android.os.IBinder;
import android.os.ResultReceiver;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputBinding;
import android.view.inputmethod.InputMethodSubtype;
import com.android.internal.view.IInputContext;
import com.android.internal.view.IInputMethodCallback;
import com.android.internal.view.IInputMethodSession;
import com.android.internal.view.IInputSessionCallback;
/**
* Top-level interface to an input method component (implemented in a
......@@ -44,7 +41,7 @@ oneway interface IInputMethod {
void restartInput(in IInputContext inputContext, in EditorInfo attribute);
void createSession(IInputMethodCallback callback);
void createSession(IInputSessionCallback callback);
void setSessionEnabled(IInputMethodSession session, boolean enabled);
......
......@@ -16,13 +16,6 @@
package com.android.internal.view;
import android.graphics.Rect;
import android.view.KeyEvent;
import android.view.MotionEvent;
import com.android.internal.view.IInputContext;
import com.android.internal.view.IInputMethodSession;
import android.os.IBinder;
/**
* Helper interface for IInputMethod to allow the input method to call back
* to its client with results from incoming calls.
......@@ -30,5 +23,4 @@ import android.os.IBinder;
*/
oneway interface IInputMethodCallback {
void finishedEvent(int seq, boolean handled);
void sessionCreated(IInputMethodSession session);
}
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.internal.view;
import com.android.internal.view.IInputMethodSession;
/**
* Helper interface for IInputMethod to allow the input method to notify the client when a new
* session has been created.
* {@hide}
*/
oneway interface IInputSessionCallback {
void sessionCreated(IInputMethodSession session);
}
......@@ -23,7 +23,7 @@ import com.android.internal.os.SomeArgs;
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.view.IInputContext;
import com.android.internal.view.IInputMethod;
import com.android.internal.view.IInputMethodCallback;
import com.android.internal.view.IInputSessionCallback;
import com.android.internal.view.IInputMethodClient;
import com.android.internal.view.IInputMethodManager;
import com.android.internal.view.IInputMethodSession;
......@@ -554,7 +554,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
}
private static class MethodCallback extends IInputMethodCallback.Stub {
private static class MethodCallback extends IInputSessionCallback.Stub {
private final IInputMethod mMethod;
private final InputMethodManagerService mParentIMMS;
......@@ -563,10 +563,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mParentIMMS = imms;
}
@Override
public void finishedEvent(int seq, boolean handled) throws RemoteException {
}
@Override
public void sessionCreated(IInputMethodSession session) throws RemoteException {
mParentIMMS.onSessionCreated(mMethod, session);
......@@ -2330,7 +2326,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
args = (SomeArgs)msg.obj;
try {
((IInputMethod)args.arg1).createSession(
(IInputMethodCallback)args.arg2);
(IInputSessionCallback)args.arg2);
} catch (RemoteException e) {
}
args.recycle();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment