Migrate to CarStatsLog from StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by *StatsLog.java
that is autogenerated for each module.
This CL adds autogenerated CarStatsLog and replaces usages
of StatsLog with CarStatsLog.
Bug: 145952197
Test: m CarService
Change-Id: I91ff0b75b2d38fb834814fcacb523a0a07d91893
diff --git a/service/Android.bp b/service/Android.bp
index d9a915b..a651c7b 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -16,7 +16,18 @@
// Build the Car service.
-car_service_sources = ["src/**/*.java"]
+genrule {
+ name: "statslog-Car-java-gen",
+ tools: ["stats-log-api-gen"],
+ cmd: "$(location stats-log-api-gen) --java $(out) --module car --javaPackage com.android.car"
+ + " --javaClass CarStatsLog",
+ out: ["com/android/car/CarStatsLog.java"],
+}
+
+car_service_sources = [
+ "src/**/*.java",
+ ":statslog-Car-java-gen",
+]
common_lib_deps = [
"android.car.userlib",