diff options
| author | 2023-03-24 16:17:50 +0000 | |
|---|---|---|
| committer | 2023-03-28 22:34:11 +0000 | |
| commit | bd992f5fca3dfccd42da29a0aa60d0592c4322bb (patch) | |
| tree | 610da2c09fabbf11f8444ffe6e9847752e285331 | |
| parent | 72a38fbbe4a21a25249c68717f2ecba57f6676d1 (diff) | |
Remove NativeInputManager::isPerDisplayTouchModeEnabled
NativeInputManager::isPerDisplayTouchModeEnabled is not referred
anywhere.
Fix: 274825843
Test: atest CtsInputTestCases:android.input.cts.TouchModeTest
Change-Id: Ia2900b42d1a449f2bd14d7e9d9f4aabc21b33333
| -rw-r--r-- | services/core/jni/com_android_server_input_InputManagerService.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index 075dcd52f487..ba9fcd0c4a8a 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -136,7 +136,7 @@ static struct { jmethodID getContextForDisplay; jmethodID notifyDropWindow; jmethodID getParentSurfaceForPointers; - jmethodID isPerDisplayTouchModeEnabled; + jmethodID isStylusPointerIconEnabled; } gServiceClassInfo; static struct { @@ -369,10 +369,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<InputManagerInterface> mInputManager; @@ -1645,16 +1641,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<bool>(enabled); -} - FloatPoint NativeInputManager::getMouseCursorPosition() { std::scoped_lock _l(mLock); const auto pc = mLocked.pointerController.lock(); @@ -2837,8 +2823,8 @@ int register_android_server_InputManager(JNIEnv* env) { GET_METHOD_ID(gServiceClassInfo.getParentSurfaceForPointers, clazz, "getParentSurfaceForPointers", "(I)J"); - GET_METHOD_ID(gServiceClassInfo.isPerDisplayTouchModeEnabled, clazz, - "isPerDisplayTouchModeEnabled", "()Z"); + GET_METHOD_ID(gServiceClassInfo.isStylusPointerIconEnabled, clazz, "isStylusPointerIconEnabled", + "()Z"); // InputDevice |