Loading cmds/statsd/src/atoms.proto +20 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,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/connectivity/tethering.proto"; import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto"; import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; Loading Loading @@ -364,6 +365,7 @@ message Atom { NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(log_from_module) = "network_stack"]; NetworkValidationReported network_validation_reported = 292 [(log_from_module) = "network_stack"]; NetworkStackQuirkReported network_stack_quirk_reported = 293 [(log_from_module) = "network_stack"]; NetworkTetheringReported network_tethering_reported = 303 [(log_from_module) = "network_tethering"]; } // Pulled events will start at field 10000. Loading Loading @@ -5852,6 +5854,24 @@ message AppCompacted { optional int64 after_zram_free_kilobytes = 18; } /** * Logs when a Tethering event occurs. * */ message NetworkTetheringReported { // tethering error code optional android.stats.connectivity.ErrorCode error_code = 1; // tethering downstream type optional android.stats.connectivity.DownstreamType downstream_type = 2; // transport type of upstream network optional android.stats.connectivity.UpstreamType upstream_type = 3; // The user type of Tethering optional android.stats.connectivity.UserType user_type= 4; } /** * Logs a DNS lookup operation initiated by the system resolver on behalf of an application * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). Loading core/proto/android/stats/connectivity/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,17 @@ java_library_static { ], sdk_version: "system_29", } java_library_static { name: "tetheringprotos", proto: { type: "lite", }, srcs: [ "tethering.proto", ], apex_available: [ "com.android.tethering", ], sdk_version: "system_current", } core/proto/android/stats/connectivity/tethering.proto 0 → 100644 +97 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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 = "TetheringProto"; enum ErrorCode { EC_NO_ERROR = 0; EC_UNKNOWN_IFACE = 1; EC_SERVICE_UNAVAIL = 2; EC_UNSUPPORTED = 3; EC_UNAVAIL_IFACE = 4; EC_INTERNAL_ERROR = 5; EC_TETHER_IFACE_ERROR = 6; EC_UNTETHER_IFACE_ERROR = 7; EC_ENABLE_FORWARDING_ERROR = 8; EC_DISABLE_FORWARDING_ERROR = 9; EC_IFACE_CFG_ERROR = 10; EC_PROVISIONING_FAILED = 11; EC_DHCPSERVER_ERROR = 12; EC_ENTITLEMENT_UNKNOWN = 13; EC_NO_CHANGE_TETHERING_PERMISSION = 14; EC_NO_ACCESS_TETHERING_PERMISSION = 15; EC_UNKNOWN_TYPE = 16; } enum DownstreamType { // Unspecific tethering type. DS_UNSPECIFIED = 0; // Wifi tethering type. DS_TETHERING_WIFI = 1; // USB tethering type. DS_TETHERING_USB = 2; // Bluetooth tethering type. DS_TETHERING_BLUETOOTH = 3; // Wifi P2p tethering type. DS_TETHERING_WIFI_P2P = 4; // NCM (Network Control Model) local tethering type. DS_TETHERING_NCM = 5; // Ethernet tethering type. DS_TETHERING_ETHERNET = 6; } enum UpstreamType { UT_UNKNOWN = 0; // Indicates upstream using a Cellular transport. UT_CELLULAR = 1; // Indicates upstream using a Wi-Fi transport. UT_WIFI = 2; // Indicates upstream using a Bluetooth transport. UT_BLUETOOTH = 3; // Indicates upstream using an Ethernet transport. UT_ETHERNET = 4; // Indicates upstream using a Wi-Fi Aware transport. UT_WIFI_AWARE = 5; // Indicates upstream using a LoWPAN transport. UT_LOWPAN = 6; // Indicates upstream using a Cellular+VPN transport. UT_CELLULAR_VPN = 7; // Indicates upstream using a Wi-Fi+VPN transport. UT_WIFI_VPN = 8; // Indicates upstream using a Bluetooth+VPN transport. UT_BLUETOOTH_VPN = 9; // Indicates upstream using an Ethernet+VPN transport. UT_ETHERNET_VPN = 10; // Indicates upstream using a Wi-Fi+Cellular+VPN transport. UT_WIFI_CELLULAR_VPN = 11; // Indicates upstream using for test only. UT_TEST = 12; // Indicates upstream using DUN capability + Cellular transport. UT_DUN_CELLULAR = 13; } enum UserType { // Unknown. USER_UNKOWNN = 0; // Settings. USER_SETTINGS = 1; // System UI. USER_SYSTEMUI = 2; // Google mobile service. USER_GMS = 3; } Loading
cmds/statsd/src/atoms.proto +20 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,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/connectivity/tethering.proto"; import "frameworks/base/core/proto/android/stats/dnsresolver/dns_resolver.proto"; import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto"; import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto"; Loading Loading @@ -364,6 +365,7 @@ message Atom { NetworkDhcpRenewReported network_dhcp_renew_reported = 291 [(log_from_module) = "network_stack"]; NetworkValidationReported network_validation_reported = 292 [(log_from_module) = "network_stack"]; NetworkStackQuirkReported network_stack_quirk_reported = 293 [(log_from_module) = "network_stack"]; NetworkTetheringReported network_tethering_reported = 303 [(log_from_module) = "network_tethering"]; } // Pulled events will start at field 10000. Loading Loading @@ -5852,6 +5854,24 @@ message AppCompacted { optional int64 after_zram_free_kilobytes = 18; } /** * Logs when a Tethering event occurs. * */ message NetworkTetheringReported { // tethering error code optional android.stats.connectivity.ErrorCode error_code = 1; // tethering downstream type optional android.stats.connectivity.DownstreamType downstream_type = 2; // transport type of upstream network optional android.stats.connectivity.UpstreamType upstream_type = 3; // The user type of Tethering optional android.stats.connectivity.UserType user_type= 4; } /** * Logs a DNS lookup operation initiated by the system resolver on behalf of an application * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). Loading
core/proto/android/stats/connectivity/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,17 @@ java_library_static { ], sdk_version: "system_29", } java_library_static { name: "tetheringprotos", proto: { type: "lite", }, srcs: [ "tethering.proto", ], apex_available: [ "com.android.tethering", ], sdk_version: "system_current", }
core/proto/android/stats/connectivity/tethering.proto 0 → 100644 +97 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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 = "TetheringProto"; enum ErrorCode { EC_NO_ERROR = 0; EC_UNKNOWN_IFACE = 1; EC_SERVICE_UNAVAIL = 2; EC_UNSUPPORTED = 3; EC_UNAVAIL_IFACE = 4; EC_INTERNAL_ERROR = 5; EC_TETHER_IFACE_ERROR = 6; EC_UNTETHER_IFACE_ERROR = 7; EC_ENABLE_FORWARDING_ERROR = 8; EC_DISABLE_FORWARDING_ERROR = 9; EC_IFACE_CFG_ERROR = 10; EC_PROVISIONING_FAILED = 11; EC_DHCPSERVER_ERROR = 12; EC_ENTITLEMENT_UNKNOWN = 13; EC_NO_CHANGE_TETHERING_PERMISSION = 14; EC_NO_ACCESS_TETHERING_PERMISSION = 15; EC_UNKNOWN_TYPE = 16; } enum DownstreamType { // Unspecific tethering type. DS_UNSPECIFIED = 0; // Wifi tethering type. DS_TETHERING_WIFI = 1; // USB tethering type. DS_TETHERING_USB = 2; // Bluetooth tethering type. DS_TETHERING_BLUETOOTH = 3; // Wifi P2p tethering type. DS_TETHERING_WIFI_P2P = 4; // NCM (Network Control Model) local tethering type. DS_TETHERING_NCM = 5; // Ethernet tethering type. DS_TETHERING_ETHERNET = 6; } enum UpstreamType { UT_UNKNOWN = 0; // Indicates upstream using a Cellular transport. UT_CELLULAR = 1; // Indicates upstream using a Wi-Fi transport. UT_WIFI = 2; // Indicates upstream using a Bluetooth transport. UT_BLUETOOTH = 3; // Indicates upstream using an Ethernet transport. UT_ETHERNET = 4; // Indicates upstream using a Wi-Fi Aware transport. UT_WIFI_AWARE = 5; // Indicates upstream using a LoWPAN transport. UT_LOWPAN = 6; // Indicates upstream using a Cellular+VPN transport. UT_CELLULAR_VPN = 7; // Indicates upstream using a Wi-Fi+VPN transport. UT_WIFI_VPN = 8; // Indicates upstream using a Bluetooth+VPN transport. UT_BLUETOOTH_VPN = 9; // Indicates upstream using an Ethernet+VPN transport. UT_ETHERNET_VPN = 10; // Indicates upstream using a Wi-Fi+Cellular+VPN transport. UT_WIFI_CELLULAR_VPN = 11; // Indicates upstream using for test only. UT_TEST = 12; // Indicates upstream using DUN capability + Cellular transport. UT_DUN_CELLULAR = 13; } enum UserType { // Unknown. USER_UNKOWNN = 0; // Settings. USER_SETTINGS = 1; // System UI. USER_SYSTEMUI = 2; // Google mobile service. USER_GMS = 3; }