summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yangster-mac <yanglu@google.com> 2018-01-04 15:43:39 -0800
committer Yangster-mac <yanglu@google.com> 2018-01-04 16:39:52 -0800
commitd19bcae42df300c080415a1a91df53c4e28ea4d5 (patch)
treedce4d66d4c89a2fcb352b14fee76a7ef5701e350
parenta598c05d632d303a49ba06fe306136e0039c785d (diff)
Move Field proto out of stats_log.proto to keep it clean.
Test: statsd unit test passed. Change-Id: I31ffea40cf1b82c16bf37c706969bfb159639c7b
-rw-r--r--cmds/statsd/Android.mk1
-rw-r--r--cmds/statsd/src/dimension.cpp1
-rw-r--r--cmds/statsd/src/field_util.h1
-rw-r--r--cmds/statsd/src/stats_log.proto6
-rw-r--r--cmds/statsd/src/statsd_internal.proto29
5 files changed, 32 insertions, 6 deletions
diff --git a/cmds/statsd/Android.mk b/cmds/statsd/Android.mk
index a365f54bfdf0..d829243619d9 100644
--- a/cmds/statsd/Android.mk
+++ b/cmds/statsd/Android.mk
@@ -19,6 +19,7 @@ statsd_common_src := \
../../core/java/android/os/IStatsManager.aidl \
src/stats_log.proto \
src/statsd_config.proto \
+ src/statsd_internal.proto \
src/atoms.proto \
src/field_util.cpp \
src/stats_log_util.cpp \
diff --git a/cmds/statsd/src/dimension.cpp b/cmds/statsd/src/dimension.cpp
index 8c0ae978fcb8..45b35869889d 100644
--- a/cmds/statsd/src/dimension.cpp
+++ b/cmds/statsd/src/dimension.cpp
@@ -17,6 +17,7 @@
#include "Log.h"
#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
+#include "frameworks/base/cmds/statsd/src/statsd_internal.pb.h"
#include "dimension.h"
#include "field_util.h"
diff --git a/cmds/statsd/src/field_util.h b/cmds/statsd/src/field_util.h
index 5907e17d666b..3e7d54cc8f0d 100644
--- a/cmds/statsd/src/field_util.h
+++ b/cmds/statsd/src/field_util.h
@@ -17,6 +17,7 @@
#pragma once
#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
+#include "frameworks/base/cmds/statsd/src/statsd_internal.pb.h"
#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
#include <unordered_map>
diff --git a/cmds/statsd/src/stats_log.proto b/cmds/statsd/src/stats_log.proto
index 0b369bb2fdbc..ae69a5070f5f 100644
--- a/cmds/statsd/src/stats_log.proto
+++ b/cmds/statsd/src/stats_log.proto
@@ -24,12 +24,6 @@ option java_outer_classname = "StatsLog";
import "frameworks/base/cmds/statsd/src/atoms.proto";
-message Field {
- optional int32 field = 1;
- optional int32 position_index = 2 [default = -1];
- repeated Field child = 3;
-}
-
message DimensionsValue {
optional int32 field = 1;
diff --git a/cmds/statsd/src/statsd_internal.proto b/cmds/statsd/src/statsd_internal.proto
new file mode 100644
index 000000000000..25aacee2770a
--- /dev/null
+++ b/cmds/statsd/src/statsd_internal.proto
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+option optimize_for = LITE_RUNTIME;
+
+package android.os.statsd;
+
+option java_package = "com.android.os";
+option java_outer_classname = "StatsdInternalProto";
+
+message Field {
+ optional int32 field = 1;
+ optional int32 position_index = 2 [default = -1];
+ repeated Field child = 3;
+}