From c90f1d023e44fe69bcd89724e56bd409fa1f47d3 Mon Sep 17 00:00:00 2001 From: hai007 Date: Thu, 6 Jan 2022 23:23:28 -0800 Subject: [PATCH] 1. In b/206869351, WiFi framework already relaxed the permission checking for WifiManager.getCountryCode() API from requesting NETWORK_SETTING permission to COARSE location. So we can change our code to get country code from WifiManager from Android T. 2. Remove @SuppressWarnings("nullness") in Utils class. PiperOrigin-RevId: 420221014 --- proto/analytics/connections_log.proto | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proto/analytics/connections_log.proto b/proto/analytics/connections_log.proto index 936cd6bd..e2d48921 100644 --- a/proto/analytics/connections_log.proto +++ b/proto/analytics/connections_log.proto @@ -412,9 +412,10 @@ message ConnectionsLog { optional string network_operator = 4 ; - // The upper-case ISO 3166-1 alpha-2 country code of the current registered - // operator's MCC (Mobile Country Code), or the country code of the default - // Locale if not available. + // The upper-case ISO 3166-1 alpha-2 country code of: + // 1. the current connected WiFi network + // 2. or the current registered operator's MCC (Mobile Country Code) + // 3. or empty string. optional string country_code = 5 ; // The TDLS status used by the wifi lan medium,