From 500b5b84eb57b86b4ef0101b74d72b6ea6ae7f8a Mon Sep 17 00:00:00 2001 From: Antonio Kantek Date: Wed, 29 Mar 2023 21:24:01 +0000 Subject: [PATCH] Remove NativeInputManager::isPerDisplayTouchModeEnabled This CL is a roll forward of I42529f4a2ea340e68b143e09e6dcba742056cfbe Fix: 274825843 Test: atest DeviceBootTest Change-Id: Id6c42da504055a0be410539440cd3e96ad19a8eb --- ...ndroid_server_input_InputManagerService.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index 075dcd52f487e..8b180fe1aa9cb 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -136,7 +136,6 @@ static struct { jmethodID getContextForDisplay; jmethodID notifyDropWindow; jmethodID getParentSurfaceForPointers; - jmethodID isPerDisplayTouchModeEnabled; } gServiceClassInfo; static struct { @@ -369,10 +368,6 @@ public: virtual PointerIconStyle getCustomPointerIconId(); virtual void onPointerDisplayIdChanged(int32_t displayId, const FloatPoint& position); - /* --- If touch mode is enabled per display or global --- */ - - virtual bool isPerDisplayTouchModeEnabled(); - private: sp mInputManager; @@ -1645,16 +1640,6 @@ void NativeInputManager::setStylusButtonMotionEventsEnabled(bool enabled) { InputReaderConfiguration::CHANGE_STYLUS_BUTTON_REPORTING); } -bool NativeInputManager::isPerDisplayTouchModeEnabled() { - JNIEnv* env = jniEnv(); - jboolean enabled = - env->CallBooleanMethod(mServiceObj, gServiceClassInfo.isPerDisplayTouchModeEnabled); - if (checkAndClearExceptionFromCallback(env, "isPerDisplayTouchModeEnabled")) { - return false; - } - return static_cast(enabled); -} - FloatPoint NativeInputManager::getMouseCursorPosition() { std::scoped_lock _l(mLock); const auto pc = mLocked.pointerController.lock(); @@ -2837,9 +2822,6 @@ int register_android_server_InputManager(JNIEnv* env) { GET_METHOD_ID(gServiceClassInfo.getParentSurfaceForPointers, clazz, "getParentSurfaceForPointers", "(I)J"); - GET_METHOD_ID(gServiceClassInfo.isPerDisplayTouchModeEnabled, clazz, - "isPerDisplayTouchModeEnabled", "()Z"); - // InputDevice FIND_CLASS(gInputDeviceClassInfo.clazz, "android/view/InputDevice");