Loading libs/input/Android.bp +1 −48 Original line number Diff line number Diff line Loading @@ -249,6 +249,7 @@ cc_library { "libcutils", "liblog", "libPlatformProperties", "libstatslog", "libtinyxml2", "libutils", "libz", // needed by libkernelconfigs Loading Loading @@ -289,17 +290,6 @@ cc_library { target: { android: { export_shared_lib_headers: ["libbinder"], shared_libs: [ "libutils", "libbinder", // Stats logging library and its dependencies. "libstatslog_libinput", "libstatsbootstrap", "android.os.statsbootstrap_aidl-cpp", ], required: [ "motion_predictor_model_prebuilt", "motion_predictor_model_config", Loading @@ -314,43 +304,6 @@ cc_library { }, } // Use bootstrap version of stats logging library. // libinput is a bootstrap process (starts early in the boot process), and thus can't use the normal // `libstatslog` because that requires `libstatssocket`, which is only available later in the boot. cc_library { name: "libstatslog_libinput", generated_sources: ["statslog_libinput.cpp"], generated_headers: ["statslog_libinput.h"], export_generated_headers: ["statslog_libinput.h"], shared_libs: [ "libbinder", "libstatsbootstrap", "libutils", "android.os.statsbootstrap_aidl-cpp", ], } genrule { name: "statslog_libinput.h", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_libinput.h --module libinput" + " --namespace android,stats,libinput --bootstrap", out: [ "statslog_libinput.h", ], } genrule { name: "statslog_libinput.cpp", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_libinput.cpp --module libinput" + " --namespace android,stats,libinput --importHeader statslog_libinput.h" + " --bootstrap", out: [ "statslog_libinput.cpp", ], } cc_defaults { name: "libinput_fuzz_defaults", cpp_std: "c++20", Loading libs/input/MotionPredictorMetricsManager.cpp +13 −20 Original line number Diff line number Diff line Loading @@ -21,14 +21,11 @@ #include <algorithm> #include <android-base/logging.h> #include <statslog.h> #include "Eigen/Core" #include "Eigen/Geometry" #ifdef __ANDROID__ #include <statslog_libinput.h> #endif namespace android { namespace { Loading @@ -48,10 +45,7 @@ inline constexpr float PATH_LENGTH_EPSILON = 0.001; void MotionPredictorMetricsManager::defaultReportAtomFunction( const MotionPredictorMetricsManager::AtomFields& atomFields) { // Call stats_write logging function only on Android targets (not supported on host). #ifdef __ANDROID__ android::stats::libinput:: stats_write(android::stats::libinput::STYLUS_PREDICTION_METRICS_REPORTED, android::util::stats_write(android::util::STYLUS_PREDICTION_METRICS_REPORTED, /*stylus_vendor_id=*/0, /*stylus_product_id=*/0, atomFields.deltaTimeBucketMilliseconds, Loading @@ -63,7 +57,6 @@ void MotionPredictorMetricsManager::defaultReportAtomFunction( atomFields.highVelocityOffTrajectoryRmse, atomFields.scaleInvariantAlongTrajectoryRmse, atomFields.scaleInvariantOffTrajectoryRmse); #endif } MotionPredictorMetricsManager::MotionPredictorMetricsManager( Loading libs/input/tests/Android.bp +1 −8 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ cc_test { "libcutils", "liblog", "libPlatformProperties", "libstatslog", "libtinyxml2", "libutils", "server_configurable_flags", Loading @@ -83,14 +84,6 @@ cc_test { address: true, }, }, android: { static_libs: [ // Stats logging library and its dependencies. "libstatslog_libinput", "libstatsbootstrap", "android.os.statsbootstrap_aidl-cpp", ], }, }, } Loading Loading
libs/input/Android.bp +1 −48 Original line number Diff line number Diff line Loading @@ -249,6 +249,7 @@ cc_library { "libcutils", "liblog", "libPlatformProperties", "libstatslog", "libtinyxml2", "libutils", "libz", // needed by libkernelconfigs Loading Loading @@ -289,17 +290,6 @@ cc_library { target: { android: { export_shared_lib_headers: ["libbinder"], shared_libs: [ "libutils", "libbinder", // Stats logging library and its dependencies. "libstatslog_libinput", "libstatsbootstrap", "android.os.statsbootstrap_aidl-cpp", ], required: [ "motion_predictor_model_prebuilt", "motion_predictor_model_config", Loading @@ -314,43 +304,6 @@ cc_library { }, } // Use bootstrap version of stats logging library. // libinput is a bootstrap process (starts early in the boot process), and thus can't use the normal // `libstatslog` because that requires `libstatssocket`, which is only available later in the boot. cc_library { name: "libstatslog_libinput", generated_sources: ["statslog_libinput.cpp"], generated_headers: ["statslog_libinput.h"], export_generated_headers: ["statslog_libinput.h"], shared_libs: [ "libbinder", "libstatsbootstrap", "libutils", "android.os.statsbootstrap_aidl-cpp", ], } genrule { name: "statslog_libinput.h", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_libinput.h --module libinput" + " --namespace android,stats,libinput --bootstrap", out: [ "statslog_libinput.h", ], } genrule { name: "statslog_libinput.cpp", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_libinput.cpp --module libinput" + " --namespace android,stats,libinput --importHeader statslog_libinput.h" + " --bootstrap", out: [ "statslog_libinput.cpp", ], } cc_defaults { name: "libinput_fuzz_defaults", cpp_std: "c++20", Loading
libs/input/MotionPredictorMetricsManager.cpp +13 −20 Original line number Diff line number Diff line Loading @@ -21,14 +21,11 @@ #include <algorithm> #include <android-base/logging.h> #include <statslog.h> #include "Eigen/Core" #include "Eigen/Geometry" #ifdef __ANDROID__ #include <statslog_libinput.h> #endif namespace android { namespace { Loading @@ -48,10 +45,7 @@ inline constexpr float PATH_LENGTH_EPSILON = 0.001; void MotionPredictorMetricsManager::defaultReportAtomFunction( const MotionPredictorMetricsManager::AtomFields& atomFields) { // Call stats_write logging function only on Android targets (not supported on host). #ifdef __ANDROID__ android::stats::libinput:: stats_write(android::stats::libinput::STYLUS_PREDICTION_METRICS_REPORTED, android::util::stats_write(android::util::STYLUS_PREDICTION_METRICS_REPORTED, /*stylus_vendor_id=*/0, /*stylus_product_id=*/0, atomFields.deltaTimeBucketMilliseconds, Loading @@ -63,7 +57,6 @@ void MotionPredictorMetricsManager::defaultReportAtomFunction( atomFields.highVelocityOffTrajectoryRmse, atomFields.scaleInvariantAlongTrajectoryRmse, atomFields.scaleInvariantOffTrajectoryRmse); #endif } MotionPredictorMetricsManager::MotionPredictorMetricsManager( Loading
libs/input/tests/Android.bp +1 −8 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ cc_test { "libcutils", "liblog", "libPlatformProperties", "libstatslog", "libtinyxml2", "libutils", "server_configurable_flags", Loading @@ -83,14 +84,6 @@ cc_test { address: true, }, }, android: { static_libs: [ // Stats logging library and its dependencies. "libstatslog_libinput", "libstatsbootstrap", "android.os.statsbootstrap_aidl-cpp", ], }, }, } Loading