Add MotionPredictorMetricsManager API
Adds the code for MotionPredictor to interface with the
MotionPredictorMetricsManger, with empty implementations
for the ...MetricsManger methods.
Test: `atest libinput_tests` passes.
Bug: 268245099
Change-Id: I514bea52ae914b181ed7aeb84581a30f2ebaed70
diff --git a/include/input/MotionPredictorMetricsManager.h b/include/input/MotionPredictorMetricsManager.h
new file mode 100644
index 0000000..6284f07
--- /dev/null
+++ b/include/input/MotionPredictorMetricsManager.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <utils/Timers.h>
+
+namespace android {
+
+/**
+ * Class to handle computing and reporting metrics for MotionPredictor.
+ *
+ * Currently an empty implementation, containing only the API.
+ */
+class MotionPredictorMetricsManager {
+public:
+ // Note: the MetricsManager assumes that the input interval equals the prediction interval.
+ MotionPredictorMetricsManager(nsecs_t /*predictionInterval*/, size_t /*maxNumPredictions*/) {}
+
+ void onRecord(const MotionEvent& /*inputEvent*/) {}
+
+ void onPredict(const MotionEvent& /*predictionEvent*/) {}
+};
+
+} // namespace android