Merge "Add network stack proto"
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 1735b05..d6ea7e6 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -40,6 +40,7 @@
import "frameworks/base/core/proto/android/server/location/enums.proto";
import "frameworks/base/core/proto/android/service/procstats_enum.proto";
import "frameworks/base/core/proto/android/service/usb.proto";
+import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto";
import "frameworks/base/core/proto/android/stats/enums.proto";
import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
@@ -252,6 +253,7 @@
StyleUIChanged style_ui_changed = 179;
PrivacyIndicatorsInteracted privacy_indicators_interacted = 180;
AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181;
+ NetworkStackReported network_stack_reported = 182;
}
// Pulled events will start at field 10000.
@@ -5851,3 +5853,14 @@
// Size of the system ion heap in bytes.
optional int64 size_in_bytes = 1;
}
+
+/**
+ * Push network stack events.
+ *
+ * Log from:
+ * frameworks/base/packages/NetworkStack/
+ */
+message NetworkStackReported {
+ optional int32 eventId = 1;
+ optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES];
+}
diff --git a/core/proto/android/stats/connectivity/Android.bp b/core/proto/android/stats/connectivity/Android.bp
new file mode 100644
index 0000000..5aa4ddb
--- /dev/null
+++ b/core/proto/android/stats/connectivity/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2019 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.
+
+java_library_static {
+ name: "networkstackprotosnano",
+ proto: {
+ type: "nano",
+ },
+ srcs: [
+ "network_stack.proto",
+ ],
+ sdk_version: "system_current",
+ no_framework_libs: true,
+}
\ No newline at end of file
diff --git a/core/proto/android/stats/connectivity/network_stack.proto b/core/proto/android/stats/connectivity/network_stack.proto
new file mode 100644
index 0000000..7d9aa1c
--- /dev/null
+++ b/core/proto/android/stats/connectivity/network_stack.proto
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2019 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";
+
+package android.stats.connectivity;
+option java_multiple_files = true;
+option java_outer_classname = "NetworkStackProto";
+
+message NetworkStackEventData {
+
+}
+
diff --git a/packages/NetworkStack/Android.bp b/packages/NetworkStack/Android.bp
index 8872147..01cd00a 100644
--- a/packages/NetworkStack/Android.bp
+++ b/packages/NetworkStack/Android.bp
@@ -29,6 +29,7 @@
"netd_aidl_interface-java",
"networkstack-aidl-interfaces-java",
"datastallprotosnano",
+ "networkstackprotosnano",
],
manifest: "AndroidManifestBase.xml",
}