Use ftl::Flags for InputReaderConfiguration::Change
Convert the config flags into an enum class and use ftl::Flags when dealing with configuration changes. Bug: 245989146 Test: Presubmit Change-Id: I6e48fd87ee30ba1172254f9f5b5ce0d607df88ec
This commit is contained in:
@@ -529,7 +529,7 @@ void NativeInputManager::setDisplayViewports(JNIEnv* env, jobjectArray viewportO
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_DISPLAY_INFO);
|
||||
InputReaderConfiguration::Change::DISPLAY_INFO);
|
||||
}
|
||||
|
||||
base::Result<std::unique_ptr<InputChannel>> NativeInputManager::createInputChannel(
|
||||
@@ -1079,7 +1079,7 @@ void NativeInputManager::setPointerDisplayId(int32_t displayId) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_DISPLAY_INFO);
|
||||
InputReaderConfiguration::Change::DISPLAY_INFO);
|
||||
}
|
||||
|
||||
void NativeInputManager::setPointerSpeed(int32_t speed) {
|
||||
@@ -1095,7 +1095,7 @@ void NativeInputManager::setPointerSpeed(int32_t speed) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_POINTER_SPEED);
|
||||
InputReaderConfiguration::Change::POINTER_SPEED);
|
||||
}
|
||||
|
||||
void NativeInputManager::setPointerAcceleration(float acceleration) {
|
||||
@@ -1111,7 +1111,7 @@ void NativeInputManager::setPointerAcceleration(float acceleration) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_POINTER_SPEED);
|
||||
InputReaderConfiguration::Change::POINTER_SPEED);
|
||||
}
|
||||
|
||||
void NativeInputManager::setTouchpadPointerSpeed(int32_t speed) {
|
||||
@@ -1127,7 +1127,7 @@ void NativeInputManager::setTouchpadPointerSpeed(int32_t speed) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_TOUCHPAD_SETTINGS);
|
||||
InputReaderConfiguration::Change::TOUCHPAD_SETTINGS);
|
||||
}
|
||||
|
||||
void NativeInputManager::setTouchpadNaturalScrollingEnabled(bool enabled) {
|
||||
@@ -1143,7 +1143,7 @@ void NativeInputManager::setTouchpadNaturalScrollingEnabled(bool enabled) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_TOUCHPAD_SETTINGS);
|
||||
InputReaderConfiguration::Change::TOUCHPAD_SETTINGS);
|
||||
}
|
||||
|
||||
void NativeInputManager::setTouchpadTapToClickEnabled(bool enabled) {
|
||||
@@ -1159,7 +1159,7 @@ void NativeInputManager::setTouchpadTapToClickEnabled(bool enabled) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_TOUCHPAD_SETTINGS);
|
||||
InputReaderConfiguration::Change::TOUCHPAD_SETTINGS);
|
||||
}
|
||||
|
||||
void NativeInputManager::setTouchpadRightClickZoneEnabled(bool enabled) {
|
||||
@@ -1175,7 +1175,7 @@ void NativeInputManager::setTouchpadRightClickZoneEnabled(bool enabled) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_TOUCHPAD_SETTINGS);
|
||||
InputReaderConfiguration::Change::TOUCHPAD_SETTINGS);
|
||||
}
|
||||
|
||||
void NativeInputManager::setInputDeviceEnabled(uint32_t deviceId, bool enabled) {
|
||||
@@ -1193,7 +1193,7 @@ void NativeInputManager::setInputDeviceEnabled(uint32_t deviceId, bool enabled)
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_ENABLED_STATE);
|
||||
InputReaderConfiguration::Change::ENABLED_STATE);
|
||||
}
|
||||
|
||||
void NativeInputManager::setShowTouches(bool enabled) {
|
||||
@@ -1209,7 +1209,7 @@ void NativeInputManager::setShowTouches(bool enabled) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_SHOW_TOUCHES);
|
||||
InputReaderConfiguration::Change::SHOW_TOUCHES);
|
||||
}
|
||||
|
||||
void NativeInputManager::requestPointerCapture(const sp<IBinder>& windowToken, bool enabled) {
|
||||
@@ -1222,7 +1222,7 @@ void NativeInputManager::setInteractive(bool interactive) {
|
||||
|
||||
void NativeInputManager::reloadCalibration() {
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_TOUCH_AFFINE_TRANSFORMATION);
|
||||
InputReaderConfiguration::Change::TOUCH_AFFINE_TRANSFORMATION);
|
||||
}
|
||||
|
||||
void NativeInputManager::setPointerIconType(PointerIconStyle iconId) {
|
||||
@@ -1516,7 +1516,7 @@ void NativeInputManager::setPointerCapture(const PointerCaptureRequest& request)
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_POINTER_CAPTURE);
|
||||
InputReaderConfiguration::Change::POINTER_CAPTURE);
|
||||
}
|
||||
|
||||
void NativeInputManager::loadPointerIcon(SpriteIcon* icon, int32_t displayId) {
|
||||
@@ -1626,7 +1626,7 @@ void NativeInputManager::setStylusButtonMotionEventsEnabled(bool enabled) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_STYLUS_BUTTON_REPORTING);
|
||||
InputReaderConfiguration::Change::STYLUS_BUTTON_REPORTING);
|
||||
}
|
||||
|
||||
FloatPoint NativeInputManager::getMouseCursorPosition() {
|
||||
@@ -1649,7 +1649,7 @@ void NativeInputManager::setStylusPointerIconEnabled(bool enabled) {
|
||||
} // release lock
|
||||
|
||||
mInputManager->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_DISPLAY_INFO);
|
||||
InputReaderConfiguration::Change::DISPLAY_INFO);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -2300,14 +2300,14 @@ static void nativeReloadKeyboardLayouts(JNIEnv* env, jobject nativeImplObj) {
|
||||
NativeInputManager* im = getNativeInputManager(env, nativeImplObj);
|
||||
|
||||
im->getInputManager()->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_KEYBOARD_LAYOUTS);
|
||||
InputReaderConfiguration::Change::KEYBOARD_LAYOUTS);
|
||||
}
|
||||
|
||||
static void nativeReloadDeviceAliases(JNIEnv* env, jobject nativeImplObj) {
|
||||
NativeInputManager* im = getNativeInputManager(env, nativeImplObj);
|
||||
|
||||
im->getInputManager()->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_DEVICE_ALIAS);
|
||||
InputReaderConfiguration::Change::DEVICE_ALIAS);
|
||||
}
|
||||
|
||||
static void nativeSysfsNodeChanged(JNIEnv* env, jobject nativeImplObj, jstring path) {
|
||||
@@ -2403,7 +2403,7 @@ static jboolean nativeCanDispatchToDisplay(JNIEnv* env, jobject nativeImplObj, j
|
||||
static void nativeNotifyPortAssociationsChanged(JNIEnv* env, jobject nativeImplObj) {
|
||||
NativeInputManager* im = getNativeInputManager(env, nativeImplObj);
|
||||
im->getInputManager()->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_DISPLAY_INFO);
|
||||
InputReaderConfiguration::Change::DISPLAY_INFO);
|
||||
}
|
||||
|
||||
static void nativeSetDisplayEligibilityForPointerCapture(JNIEnv* env, jobject nativeImplObj,
|
||||
@@ -2416,19 +2416,19 @@ static void nativeSetDisplayEligibilityForPointerCapture(JNIEnv* env, jobject na
|
||||
static void nativeChangeUniqueIdAssociation(JNIEnv* env, jobject nativeImplObj) {
|
||||
NativeInputManager* im = getNativeInputManager(env, nativeImplObj);
|
||||
im->getInputManager()->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_DISPLAY_INFO);
|
||||
InputReaderConfiguration::Change::DISPLAY_INFO);
|
||||
}
|
||||
|
||||
static void nativeChangeTypeAssociation(JNIEnv* env, jobject nativeImplObj) {
|
||||
NativeInputManager* im = getNativeInputManager(env, nativeImplObj);
|
||||
im->getInputManager()->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_DEVICE_TYPE);
|
||||
InputReaderConfiguration::Change::DEVICE_TYPE);
|
||||
}
|
||||
|
||||
static void changeKeyboardLayoutAssociation(JNIEnv* env, jobject nativeImplObj) {
|
||||
NativeInputManager* im = getNativeInputManager(env, nativeImplObj);
|
||||
im->getInputManager()->getReader().requestRefreshConfiguration(
|
||||
InputReaderConfiguration::CHANGE_KEYBOARD_LAYOUT_ASSOCIATION);
|
||||
InputReaderConfiguration::Change::KEYBOARD_LAYOUT_ASSOCIATION);
|
||||
}
|
||||
|
||||
static void nativeSetMotionClassifierEnabled(JNIEnv* env, jobject nativeImplObj, jboolean enabled) {
|
||||
|
||||
Reference in New Issue
Block a user