diff options
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | cmds/statsd/Android.bp | 51 | ||||
-rw-r--r-- | cmds/statsd/src/shell/shell_data.proto | 2 | ||||
-rw-r--r-- | cmds/statsd/src/stats_log.proto | 2 | ||||
-rw-r--r-- | cmds/statsd/tests/LogEvent_test.cpp | 2 | ||||
-rw-r--r-- | cmds/statsd/tests/shell/ShellSubscriber_test.cpp | 2 | ||||
-rw-r--r-- | tools/stats_log_api_gen/Collation.cpp | 2 | ||||
-rw-r--r-- | tools/stats_log_api_gen/Collation.h | 2 | ||||
-rw-r--r-- | tools/stats_log_api_gen/main.cpp | 2 | ||||
-rw-r--r-- | tools/stats_log_api_gen/test.proto | 4 |
10 files changed, 46 insertions, 29 deletions
diff --git a/Android.bp b/Android.bp index 2b9dc45699fb..dcb6ac77fe98 100644 --- a/Android.bp +++ b/Android.bp @@ -812,17 +812,13 @@ java_library_host { name: "platformprotos", srcs: [ ":ipconnectivity-proto-src", - ":libstats_internal_protos", "cmds/am/proto/instrumentation_data.proto", "cmds/statsd/src/**/*.proto", "core/proto/**/*.proto", "libs/incident/proto/**/*.proto", ], proto: { - include_dirs: [ - "external/protobuf/src", - "frameworks/proto_logging/stats", - ], + include_dirs: ["external/protobuf/src"], type: "full", }, errorprone: { diff --git a/cmds/statsd/Android.bp b/cmds/statsd/Android.bp index e1b7c5350546..0617eb6c0e66 100644 --- a/cmds/statsd/Android.bp +++ b/cmds/statsd/Android.bp @@ -14,6 +14,34 @@ // limitations under the License. // +// ========================================================== +// Build the library for use on the host +// ========================================================== +cc_library_host_shared { + name: "libstats_proto_host", + srcs: [ + "src/atoms.proto", + "src/atom_field_options.proto", + ], + + shared_libs: [ + "libplatformprotos", + ], + + proto: { + type: "full", + export_proto_headers: true, + include_dirs: [ + "external/protobuf/src", + ], + }, + + export_shared_lib_headers: [ + "libplatformprotos", + ] + +} + cc_defaults { name: "statsd_defaults", @@ -247,8 +275,9 @@ cc_test { // atom_field_options.proto needs field_options.proto, but that is // not included in libprotobuf-cpp-lite, so compile it here. ":libprotobuf-internal-protos", - ":libstats_internal_protos", + "src/atom_field_options.proto", + "src/atoms.proto", "src/shell/shell_data.proto", "src/stats_log.proto", "tests/AlarmMonitor_test.cpp", @@ -312,10 +341,7 @@ cc_test { proto: { type: "lite", - include_dirs: [ - "external/protobuf/src", - "frameworks/proto_logging/stats", - ], + include_dirs: ["external/protobuf/src"], }, } @@ -332,7 +358,6 @@ cc_benchmark { // atom_field_options.proto needs field_options.proto, but that is // not included in libprotobuf-cpp-lite, so compile it here. ":libprotobuf-internal-protos", - ":libstats_internal_protos", "benchmark/duration_metric_benchmark.cpp", "benchmark/filter_value_benchmark.cpp", @@ -342,15 +367,14 @@ cc_benchmark { "benchmark/main.cpp", "benchmark/metric_util.cpp", "benchmark/stats_write_benchmark.cpp", + "src/atom_field_options.proto", + "src/atoms.proto", "src/stats_log.proto", ], proto: { type: "lite", - include_dirs: [ - "external/protobuf/src", - "frameworks/proto_logging/stats", - ], + include_dirs: ["external/protobuf/src"], }, cflags: [ @@ -382,14 +406,11 @@ java_library { sdk_version: "core_current", proto: { type: "lite", - include_dirs: [ - "external/protobuf/src", - "frameworks/proto_logging/stats", - ], + include_dirs: ["external/protobuf/src"], }, srcs: [ - ":libstats_atoms_proto", + "src/atoms.proto", "src/shell/shell_config.proto", "src/shell/shell_data.proto", "src/stats_log.proto", diff --git a/cmds/statsd/src/shell/shell_data.proto b/cmds/statsd/src/shell/shell_data.proto index ec41cbc5caff..236bdbdd31f6 100644 --- a/cmds/statsd/src/shell/shell_data.proto +++ b/cmds/statsd/src/shell/shell_data.proto @@ -21,7 +21,7 @@ package android.os.statsd; option java_package = "com.android.os.statsd"; option java_outer_classname = "ShellDataProto"; -import "frameworks/proto_logging/stats/atoms.proto"; +import "frameworks/base/cmds/statsd/src/atoms.proto"; // The output of shell subscription, including both pulled and pushed subscriptions. message ShellData { diff --git a/cmds/statsd/src/stats_log.proto b/cmds/statsd/src/stats_log.proto index bb0796326f01..ddd2725c9cb9 100644 --- a/cmds/statsd/src/stats_log.proto +++ b/cmds/statsd/src/stats_log.proto @@ -21,7 +21,7 @@ package android.os.statsd; option java_package = "com.android.os"; option java_outer_classname = "StatsLog"; -import "frameworks/proto_logging/stats/atoms.proto"; +import "frameworks/base/cmds/statsd/src/atoms.proto"; message DimensionsValue { optional int32 field = 1; diff --git a/cmds/statsd/tests/LogEvent_test.cpp b/cmds/statsd/tests/LogEvent_test.cpp index 41bdff8a464c..5c170c07eb7d 100644 --- a/cmds/statsd/tests/LogEvent_test.cpp +++ b/cmds/statsd/tests/LogEvent_test.cpp @@ -16,8 +16,8 @@ #include <gtest/gtest.h> +#include "frameworks/base/cmds/statsd/src/atoms.pb.h" #include "frameworks/base/core/proto/android/stats/launcher/launcher.pb.h" -#include "frameworks/proto_logging/stats/atoms.pb.h" #include "log/log_event_list.h" #include "stats_event.h" diff --git a/cmds/statsd/tests/shell/ShellSubscriber_test.cpp b/cmds/statsd/tests/shell/ShellSubscriber_test.cpp index 1f0e2c82cb32..e384b6ac7c84 100644 --- a/cmds/statsd/tests/shell/ShellSubscriber_test.cpp +++ b/cmds/statsd/tests/shell/ShellSubscriber_test.cpp @@ -20,9 +20,9 @@ #include <vector> +#include "frameworks/base/cmds/statsd/src/atoms.pb.h" #include "frameworks/base/cmds/statsd/src/shell/shell_config.pb.h" #include "frameworks/base/cmds/statsd/src/shell/shell_data.pb.h" -#include "frameworks/proto_logging/stats/atoms.pb.h" #include "stats_event.h" #include "tests/metrics/metrics_test_helper.h" #include "tests/statsd_test_util.h" diff --git a/tools/stats_log_api_gen/Collation.cpp b/tools/stats_log_api_gen/Collation.cpp index 2608097a359a..a230de46dcf3 100644 --- a/tools/stats_log_api_gen/Collation.cpp +++ b/tools/stats_log_api_gen/Collation.cpp @@ -20,7 +20,7 @@ #include <map> -#include "frameworks/proto_logging/stats/atoms.pb.h" +#include "frameworks/base/cmds/statsd/src/atoms.pb.h" namespace android { namespace stats_log_api_gen { diff --git a/tools/stats_log_api_gen/Collation.h b/tools/stats_log_api_gen/Collation.h index 3deb3ae189a4..10b34ecf5f54 100644 --- a/tools/stats_log_api_gen/Collation.h +++ b/tools/stats_log_api_gen/Collation.h @@ -24,7 +24,7 @@ #include <set> #include <vector> -#include "frameworks/proto_logging/stats/atom_field_options.pb.h" +#include "frameworks/base/cmds/statsd/src/atom_field_options.pb.h" namespace android { namespace stats_log_api_gen { diff --git a/tools/stats_log_api_gen/main.cpp b/tools/stats_log_api_gen/main.cpp index 416dfdd1ae10..b888ce904b31 100644 --- a/tools/stats_log_api_gen/main.cpp +++ b/tools/stats_log_api_gen/main.cpp @@ -9,7 +9,7 @@ #include <vector> #include "Collation.h" -#include "frameworks/proto_logging/stats/atoms.pb.h" +#include "frameworks/base/cmds/statsd/src/atoms.pb.h" #include "java_writer.h" #include "java_writer_q.h" #include "native_writer.h" diff --git a/tools/stats_log_api_gen/test.proto b/tools/stats_log_api_gen/test.proto index a3ea78533a5e..aaa488e44fee 100644 --- a/tools/stats_log_api_gen/test.proto +++ b/tools/stats_log_api_gen/test.proto @@ -16,8 +16,8 @@ syntax = "proto2"; -import "frameworks/proto_logging/stats/atoms.proto"; -import "frameworks/proto_logging/stats/atom_field_options.proto"; +import "frameworks/base/cmds/statsd/src/atoms.proto"; +import "frameworks/base/cmds/statsd/src/atom_field_options.proto"; package android.stats_log_api_gen; |