Move Field proto out of stats_log.proto to keep it clean.
Test: statsd unit test passed.
Change-Id: I31ffea40cf1b82c16bf37c706969bfb159639c7b
diff --git a/cmds/statsd/src/dimension.cpp b/cmds/statsd/src/dimension.cpp
index 8c0ae97..45b3586 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 5907e17..3e7d54c 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 0b369bb..ae69a50 100644
--- a/cmds/statsd/src/stats_log.proto
+++ b/cmds/statsd/src/stats_log.proto
@@ -24,12 +24,6 @@
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 0000000..25aacee
--- /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;
+}