Add FrameworkStatsLog

Add a genrule for FrameworkStatsLog and it to frameworks.jar

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 FrameworkStatsLog.

Follow up CLs will replace usages of StatsLog.write calls with
FrameworkStatsLog.write.

Bug: 145952197
Test: m
Merged-In: I6ba6a67e019a3b5cffd936dad7ce9db6c8c51632
Change-Id: I6ba6a67e019a3b5cffd936dad7ce9db6c8c51632
(cherry-pick from internal branch with minor conflicts)
diff --git a/Android.bp b/Android.bp
index feaafa3..761870c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -270,7 +270,8 @@
 
         // etc.
         ":framework-javastream-protos",
-        ":framework-statslog-gen",
+        ":framework-statslog-gen", // StatsLogInternal.java
+        ":statslog-framework-java-gen", // FrameworkStatsLog.java
     ],
 }
 
@@ -555,6 +556,14 @@
     out: ["android/util/StatsLogInternal.java"],
 }
 
+genrule {
+    name: "statslog-framework-java-gen",
+    tools: ["stats-log-api-gen"],
+    cmd: "$(location stats-log-api-gen) --java $(out) --module framework" +
+         " --javaPackage com.android.internal.util --javaClass FrameworkStatsLog --worksource",
+    out: ["com/android/internal/util/FrameworkStatsLog.java"],
+}
+
 gensrcs {
     name: "framework-javastream-protos",
     depfile: true,