summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/location/GeoUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/dialer/location/GeoUtil.java')
-rw-r--r--java/com/android/dialer/location/GeoUtil.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/com/android/dialer/location/GeoUtil.java b/java/com/android/dialer/location/GeoUtil.java
index 27fbf2315..8a875e842 100644
--- a/java/com/android/dialer/location/GeoUtil.java
+++ b/java/com/android/dialer/location/GeoUtil.java
@@ -22,7 +22,12 @@ import android.os.Trace;
/** Static methods related to Geo. */
public class GeoUtil {
- /** @return the ISO 3166-1 two letters country code of the country the user is in. */
+ /**
+ * Return the ISO 3166-1 two letters country code of the country the user is in.
+ *
+ * <p>WARNING: {@link CountryDetector} caches TelephonyManager and other system services in a
+ * static. {@link CountryDetector#instance} must be reset in tests.
+ */
public static String getCurrentCountryIso(Context context) {
// The {@link CountryDetector} should never return null so this is safe to return as-is.
Trace.beginSection("GeoUtil.getCurrentCountryIso");