SF TimeStats: update build file and some cleanups

Remove the redundant part in the Android.bp file, and at the same time
remove some unused code.

Test: dumpsys SurfaceFlinger --timestats <see go/sf-timestats for args>
Bug: b/70388650
Change-Id: I5ddd63234780f4f482c4628de173ac6167b628f5
diff --git a/services/surfaceflinger/TimeStats/timestatsproto/Android.bp b/services/surfaceflinger/TimeStats/timestatsproto/Android.bp
index 66aa719..46c82c0 100644
--- a/services/surfaceflinger/TimeStats/timestatsproto/Android.bp
+++ b/services/surfaceflinger/TimeStats/timestatsproto/Android.bp
@@ -1,6 +1,5 @@
 cc_library_shared {
     name: "libtimestats_proto",
-    vendor_available: true,
     export_include_dirs: ["include"],
 
     srcs: [
@@ -9,11 +8,8 @@
     ],
 
     shared_libs: [
-        "android.hardware.graphics.common@1.1",
-        "libui",
-        "libprotobuf-cpp-lite",
         "libbase",
-        "liblog",
+        "libprotobuf-cpp-lite",
     ],
 
     proto: {
@@ -22,34 +18,16 @@
 
     cppflags: [
         "-Werror",
-        "-Wno-unused-parameter",
-        "-Wno-format",
         "-Wno-c++98-compat-pedantic",
-        "-Wno-float-conversion",
         "-Wno-disabled-macro-expansion",
+        "-Wno-float-conversion",
         "-Wno-float-equal",
-        "-Wno-sign-conversion",
-        "-Wno-padded",
+        "-Wno-format",
         "-Wno-old-style-cast",
+        "-Wno-padded",
+        "-Wno-sign-conversion",
         "-Wno-undef",
+        "-Wno-unused-parameter",
     ],
 
 }
-
-java_library_static {
-    name: "timestatsprotosnano",
-    host_supported: true,
-    proto: {
-        type: "nano",
-    },
-    srcs: ["*.proto"],
-    no_framework_libs: true,
-    target: {
-        android: {
-            jarjar_rules: "jarjar-rules.txt",
-        },
-        host: {
-            static_libs: ["libprotobuf-java-nano"],
-        },
-    },
-}
diff --git a/services/surfaceflinger/TimeStats/timestatsproto/include/timestatsproto/TimeStatsHelper.h b/services/surfaceflinger/TimeStats/timestatsproto/include/timestatsproto/TimeStatsHelper.h
index c876f21..cd35e9f 100644
--- a/services/surfaceflinger/TimeStats/timestatsproto/include/timestatsproto/TimeStatsHelper.h
+++ b/services/surfaceflinger/TimeStats/timestatsproto/include/timestatsproto/TimeStatsHelper.h
@@ -17,9 +17,6 @@
 
 #include <timestatsproto/TimeStatsProtoHeader.h>
 
-#include <math/vec4.h>
-
-#include <memory>
 #include <string>
 #include <unordered_map>
 #include <vector>
diff --git a/services/surfaceflinger/TimeStats/timestatsproto/jarjar-rules.txt b/services/surfaceflinger/TimeStats/timestatsproto/jarjar-rules.txt
deleted file mode 100644
index 40043a8..0000000
--- a/services/surfaceflinger/TimeStats/timestatsproto/jarjar-rules.txt
+++ /dev/null
@@ -1 +0,0 @@
-rule com.google.protobuf.nano.** com.android.framework.protobuf.nano.@1
diff --git a/services/surfaceflinger/TimeStats/timestatsproto/timestats.proto b/services/surfaceflinger/TimeStats/timestatsproto/timestats.proto
index a8f6fa8..f29fbd1 100644
--- a/services/surfaceflinger/TimeStats/timestatsproto/timestats.proto
+++ b/services/surfaceflinger/TimeStats/timestatsproto/timestats.proto
@@ -20,10 +20,6 @@
 
 option optimize_for = LITE_RUNTIME;
 
-// frameworks/base/core/proto/android/service/sftimestats.proto is based on
-// this proto. Please only make valid protobuf changes to these messages, and
-// keep the other file in sync with this one.
-
 message SFTimeStatsGlobalProto {
   // The start & end timestamps in UTC as
   // milliseconds since January 1, 1970