Use sysprop APIs for InputFlinger: per_window_input_rotation
Add a sysprop file for InputFlinger, and add a sysprop entry for the
per_window_input_rotation flag.
Bug: 179274888
Test: build
Change-Id: Id11f72f7774e2b04a9817ac5807808ccbd33fb28
diff --git a/services/inputflinger/reader/Android.bp b/services/inputflinger/reader/Android.bp
index 7db32e3..ee7b392 100644
--- a/services/inputflinger/reader/Android.bp
+++ b/services/inputflinger/reader/Android.bp
@@ -71,6 +71,7 @@
"libstatslog",
"libui",
"libutils",
+ "InputFlingerProperties",
],
static_libs: [
"libc++fs",
diff --git a/services/inputflinger/reader/mapper/TouchCursorInputMapperCommon.h b/services/inputflinger/reader/mapper/TouchCursorInputMapperCommon.h
index da0fea4..4c5ff63 100644
--- a/services/inputflinger/reader/mapper/TouchCursorInputMapperCommon.h
+++ b/services/inputflinger/reader/mapper/TouchCursorInputMapperCommon.h
@@ -17,7 +17,7 @@
#ifndef _UI_INPUTREADER_TOUCH_CURSOR_INPUT_MAPPER_COMMON_H
#define _UI_INPUTREADER_TOUCH_CURSOR_INPUT_MAPPER_COMMON_H
-#include <android-base/properties.h>
+#include <InputFlingerProperties.sysprop.h>
#include <input/DisplayViewport.h>
#include <stdint.h>
@@ -34,7 +34,7 @@
// un-rotated coordinate space.
static bool isPerWindowInputRotationEnabled() {
static const bool PER_WINDOW_INPUT_ROTATION =
- base::GetBoolProperty("persist.debug.per_window_input_rotation", false);
+ sysprop::InputFlingerProperties::per_window_input_rotation().value_or(false);
return PER_WINDOW_INPUT_ROTATION;
}