Loading services/core/java/com/android/server/input/InputManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -1760,14 +1760,14 @@ public class InputManagerService extends IInputManager.Stub } // Native callback private void notifyFocusChanged(IBinder token) { if (mFocusedWindow.asBinder() == token) { private void notifyFocusChanged(IBinder oldToken, IBinder newToken) { if (mFocusedWindow.asBinder() == newToken) { Log.w(TAG, "notifyFocusChanged called with unchanged mFocusedWindow=" + mFocusedWindow); return; } setPointerCapture(false); mFocusedWindow = IWindow.Stub.asInterface(token); mFocusedWindow = IWindow.Stub.asInterface(newToken); } // Native callback. Loading services/core/jni/com_android_server_input_InputManagerService.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ public: const sp<IBinder>& token, const std::string& reason); virtual void notifyInputChannelBroken(const sp<IBinder>& token); virtual void notifyFocusChanged(const sp<IBinder>& token); virtual void notifyFocusChanged(const sp<IBinder>& oldToken, const sp<IBinder>& newToken); virtual bool filterInputEvent(const InputEvent* inputEvent, uint32_t policyFlags); virtual void getDispatcherConfiguration(InputDispatcherConfiguration* outConfig); virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags); Loading Loading @@ -738,7 +738,8 @@ void NativeInputManager::notifyInputChannelBroken(const sp<IBinder>& token) { } } void NativeInputManager::notifyFocusChanged(const sp<IBinder>& token) { void NativeInputManager::notifyFocusChanged(const sp<IBinder>& oldToken, const sp<IBinder>& newToken) { #if DEBUG_INPUT_DISPATCHER_POLICY ALOGD("notifyFocusChanged"); #endif Loading @@ -746,13 +747,12 @@ void NativeInputManager::notifyFocusChanged(const sp<IBinder>& token) { JNIEnv* env = jniEnv(); jobject tokenObj = javaObjectForIBinder(env, token); if (tokenObj) { jobject oldTokenObj = javaObjectForIBinder(env, oldToken); jobject newTokenObj = javaObjectForIBinder(env, newToken); env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyFocusChanged, tokenObj); oldTokenObj, newTokenObj); checkAndClearExceptionFromCallback(env, "notifyFocusChanged"); } } void NativeInputManager::getDispatcherConfiguration(InputDispatcherConfiguration* outConfig) { ATRACE_CALL(); Loading Loading @@ -1762,7 +1762,7 @@ int register_android_server_InputManager(JNIEnv* env) { "notifyInputChannelBroken", "(Landroid/os/IBinder;)V"); GET_METHOD_ID(gServiceClassInfo.notifyFocusChanged, clazz, "notifyFocusChanged", "(Landroid/os/IBinder;)V"); "notifyFocusChanged", "(Landroid/os/IBinder;Landroid/os/IBinder;)V"); GET_METHOD_ID(gServiceClassInfo.notifyANR, clazz, "notifyANR", Loading Loading
services/core/java/com/android/server/input/InputManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -1760,14 +1760,14 @@ public class InputManagerService extends IInputManager.Stub } // Native callback private void notifyFocusChanged(IBinder token) { if (mFocusedWindow.asBinder() == token) { private void notifyFocusChanged(IBinder oldToken, IBinder newToken) { if (mFocusedWindow.asBinder() == newToken) { Log.w(TAG, "notifyFocusChanged called with unchanged mFocusedWindow=" + mFocusedWindow); return; } setPointerCapture(false); mFocusedWindow = IWindow.Stub.asInterface(token); mFocusedWindow = IWindow.Stub.asInterface(newToken); } // Native callback. Loading
services/core/jni/com_android_server_input_InputManagerService.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ public: const sp<IBinder>& token, const std::string& reason); virtual void notifyInputChannelBroken(const sp<IBinder>& token); virtual void notifyFocusChanged(const sp<IBinder>& token); virtual void notifyFocusChanged(const sp<IBinder>& oldToken, const sp<IBinder>& newToken); virtual bool filterInputEvent(const InputEvent* inputEvent, uint32_t policyFlags); virtual void getDispatcherConfiguration(InputDispatcherConfiguration* outConfig); virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags); Loading Loading @@ -738,7 +738,8 @@ void NativeInputManager::notifyInputChannelBroken(const sp<IBinder>& token) { } } void NativeInputManager::notifyFocusChanged(const sp<IBinder>& token) { void NativeInputManager::notifyFocusChanged(const sp<IBinder>& oldToken, const sp<IBinder>& newToken) { #if DEBUG_INPUT_DISPATCHER_POLICY ALOGD("notifyFocusChanged"); #endif Loading @@ -746,13 +747,12 @@ void NativeInputManager::notifyFocusChanged(const sp<IBinder>& token) { JNIEnv* env = jniEnv(); jobject tokenObj = javaObjectForIBinder(env, token); if (tokenObj) { jobject oldTokenObj = javaObjectForIBinder(env, oldToken); jobject newTokenObj = javaObjectForIBinder(env, newToken); env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyFocusChanged, tokenObj); oldTokenObj, newTokenObj); checkAndClearExceptionFromCallback(env, "notifyFocusChanged"); } } void NativeInputManager::getDispatcherConfiguration(InputDispatcherConfiguration* outConfig) { ATRACE_CALL(); Loading Loading @@ -1762,7 +1762,7 @@ int register_android_server_InputManager(JNIEnv* env) { "notifyInputChannelBroken", "(Landroid/os/IBinder;)V"); GET_METHOD_ID(gServiceClassInfo.notifyFocusChanged, clazz, "notifyFocusChanged", "(Landroid/os/IBinder;)V"); "notifyFocusChanged", "(Landroid/os/IBinder;Landroid/os/IBinder;)V"); GET_METHOD_ID(gServiceClassInfo.notifyANR, clazz, "notifyANR", Loading