From cc3b8a0743196e639c2ecff92d4d15d395ec5503 Mon Sep 17 00:00:00 2001 From: Shuo Qian Date: Thu, 26 Mar 2020 19:44:15 -0700 Subject: [PATCH] Add a hidden API for EXTRA_LAST_KNOWN_NETWORK_COUNTRY Test: Treehugger; atest Bug: 152246523 Change-Id: Id77b81e18b293d8d8c8e7b3127826fbd577d6117 Merged-In: Id77b81e18b293d8d8c8e7b3127826fbd577d6117 (cherry picked from commit 8d1791efc788cf51984b9167f492488bd5deb996) --- .../java/android/telephony/TelephonyManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 8d6120c3a7718..c37262c6d2ccb 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -12156,6 +12156,17 @@ public class TelephonyManager { public static final String EXTRA_NETWORK_COUNTRY = "android.telephony.extra.NETWORK_COUNTRY"; + /** + * The extra used with an {@link #ACTION_NETWORK_COUNTRY_CHANGED} to specify the + * last known the country code in ISO-3166-1 alpha-2 format. + *

+ * Retrieve with {@link android.content.Intent#getStringExtra(String)}. + * + * @hide + */ + public static final String EXTRA_LAST_KNOWN_NETWORK_COUNTRY = + "android.telephony.extra.LAST_KNOWN_NETWORK_COUNTRY"; + /** * Indicate if the user is allowed to use multiple SIM cards at the same time to register * on the network (e.g. Dual Standby or Dual Active) when the device supports it, or if the