From 1c8b991615710d3a112ccd58f819edd4c8df1ba1 Mon Sep 17 00:00:00 2001 From: Automerger Merge Worker Date: Tue, 25 Feb 2020 07:48:51 +0000 Subject: [PATCH 1/3] ADD new enum NetworkType to identify multiple transport type Add new NetworkType for multiple transport 1. CELLULAR + VPN = NT_CELLULAR_VPN 2. WIFI + VPN = NT_WIFI_VPN 3. BLUETOOTH + VPN = NT_BLUETOOTH_VPN 4. Ethernet + VPN = NT_ETHERNET_VPN Bug: 143732914 Test: atest Merged-In: I0d106ca1631265b872386b59d542b206614f38ef Change-Id: I85d7aa69bc4a1f4a6de3f68cec1fcc3b8848e5c5 (cherry picked from commit 467962e92867c8e97f205a2d82b55f9e2d3f46b8) --- .../android/stats/dnsresolver/dns_resolver.proto | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/proto/android/stats/dnsresolver/dns_resolver.proto b/core/proto/android/stats/dnsresolver/dns_resolver.proto index 76f8f0febf59e..afd109996722a 100644 --- a/core/proto/android/stats/dnsresolver/dns_resolver.proto +++ b/core/proto/android/stats/dnsresolver/dns_resolver.proto @@ -170,12 +170,20 @@ enum NetworkType { NT_BLUETOOTH = 3; // Indicates this network uses an Ethernet transport. NT_ETHERNET = 4; - // Indicates this network uses a VPN transport. - NT_VPN = 5; + // Indicates this network uses a VPN transport, now deprecated. + NT_VPN = 5 [deprecated=true]; // Indicates this network uses a Wi-Fi Aware transport. NT_WIFI_AWARE = 6; // Indicates this network uses a LoWPAN transport. NT_LOWPAN = 7; + // Indicates this network uses a Cellular+VPN transport. + NT_CELLULAR_VPN = 8; + // Indicates this network uses a Wi-Fi+VPN transport. + NT_WIFI_VPN = 9; + // Indicates this network uses a Bluetooth+VPN transport. + NT_BLUETOOTH_VPN = 10; + // Indicates this network uses an Ethernet+VPN transport. + NT_ETHERNET_VPN = 11; } enum CacheStatus{ From 1e3dffd334c3c5fd1c2b043802f307f5dfda2fdd Mon Sep 17 00:00:00 2001 From: Frank Li Date: Thu, 2 Apr 2020 20:19:43 +0000 Subject: [PATCH 2/3] Add new NetworkType for WIFI+CELLULAR+VPN transport Define NT_WIFI_CELLULAR_VPN in enum NetworkType. =>Indicates this network uses a WIFI+CELLULAR+VPN transport. Bug: 143732914 Test: Manual test with statsd_testdrive Merged-In: I1d43633705b69bf0111386630b2eebf394cb9366 Change-Id: I4575b912db7457e0e0c1dea4d1af07389a4cf394 (cherry picked from commit b1997b78ce414ec01b0e49caacd6c156ca5bbc35) --- core/proto/android/stats/dnsresolver/dns_resolver.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/proto/android/stats/dnsresolver/dns_resolver.proto b/core/proto/android/stats/dnsresolver/dns_resolver.proto index afd109996722a..448c12dd8d293 100644 --- a/core/proto/android/stats/dnsresolver/dns_resolver.proto +++ b/core/proto/android/stats/dnsresolver/dns_resolver.proto @@ -184,6 +184,8 @@ enum NetworkType { NT_BLUETOOTH_VPN = 10; // Indicates this network uses an Ethernet+VPN transport. NT_ETHERNET_VPN = 11; + // Indicates this network uses a Wi-Fi+Cellular+VPN transport. + NT_WIFI_CELLULAR_VPN = 12; } enum CacheStatus{ From 3fd2ea58f71e0efbf515130bcf1b9e8fcb13e49a Mon Sep 17 00:00:00 2001 From: Automerger Merge Worker Date: Fri, 3 Apr 2020 18:14:10 +0000 Subject: [PATCH 3/3] Define rcode=12~15 (UNASSIGNED) in rcode enum type RCODE Name 11 NS_R_MAX 12 NS_R_UNASSIGNED12 13 NS_R_UNASSIGNED13 14 NS_R_UNASSIGNED14 15 NS_R_UNASSIGNED15 16 NS_R_BADVERS According the stats data of Dns Resolver module, Some DNS Servers might return undefined code to devices. Without the enum definition, that would be noise for our dashboard Bug: 150194702 Test: Manual test with statsd_testdrive Merged-In: I178164f37b70d0ce86dfb7e37e01b663abbf82f2 Change-Id: I2c2f3307487b85f360fe8733667595617e3716d0 (cherry picked from commit 4ec941aa071c68fe29cdb50d2516678441b82105) --- core/proto/android/stats/dnsresolver/dns_resolver.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/proto/android/stats/dnsresolver/dns_resolver.proto b/core/proto/android/stats/dnsresolver/dns_resolver.proto index 448c12dd8d293..61b9b25fe7cf4 100644 --- a/core/proto/android/stats/dnsresolver/dns_resolver.proto +++ b/core/proto/android/stats/dnsresolver/dns_resolver.proto @@ -62,6 +62,13 @@ enum NsRcode { NS_R_NOTAUTH = 9; // Not authoritative for zone NS_R_NOTZONE = 10; // Zone of record different from zone section NS_R_MAX = 11; + // Define rcode=12~15(UNASSIGNED) in rcode enum type. + // Some DNS Servers might return undefined code to devices. + // Without the enum definition, that would be noise for our dashboard. + NS_R_UNASSIGNED12 = 12; // Unassigned + NS_R_UNASSIGNED13 = 13; // Unassigned + NS_R_UNASSIGNED14 = 14; // Unassigned + NS_R_UNASSIGNED15 = 15; // Unassigned // The following are EDNS extended rcodes NS_R_BADVERS = 16; // The following are TSIG errors