From cea0d8d4883c94482d936abd4d097617921c6fa7 Mon Sep 17 00:00:00 2001 From: yinxu Date: Fri, 16 Mar 2018 10:16:53 -0700 Subject: [PATCH] Add more comments for the isConfigForIdentifiedCarrier() Bug:74945742 Test: Compile Change-Id: Ife3fdf797ca8877ec495d61a8aeed56fa20282a7 --- .../java/android/telephony/CarrierConfigManager.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index fa0777782f3b1..9268badfc2eff 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2209,7 +2209,9 @@ public class CarrierConfigManager { /** * Gets the configuration values for a particular subscription, which is associated with a * specific SIM card. If an invalid subId is used, the returned config will contain default - * values. + * values. After using this method to get the configuration bundle, + * {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be called to confirm whether + * any carrier specific configuration has been applied. * *

Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} @@ -2236,7 +2238,9 @@ public class CarrierConfigManager { } /** - * Gets the configuration values for the default subscription. + * Gets the configuration values for the default subscription. After using this method to get + * the configuration bundle, {@link #isConfigForIdentifiedCarrier(PersistableBundle)} should be + * called to confirm whether any carrier specific configuration has been applied. * *

Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} @@ -2265,6 +2269,9 @@ public class CarrierConfigManager { *

* After using {@link #getConfig()} or {@link #getConfigForSubId(int)} an app should always * use this method to confirm whether any carrier specific configuration has been applied. + * Especially when an app misses the broadcast {@link #ACTION_CARRIER_CONFIG_CHANGED} but it + * still needs to get the current configuration, it must use this method to verify whether the + * configuration is default or carrier overridden. *

* * @param bundle the configuration bundle to be checked.