diff options
| author | 2018-03-16 10:16:53 -0700 | |
|---|---|---|
| committer | 2018-03-22 12:08:51 -0700 | |
| commit | 349b644db3ca68ea6ef008d4c86c29e88cab969d (patch) | |
| tree | dc3ac065a2455d09a446d877290ca5f18dd80632 | |
| parent | 7cadb341cf34a50eef9e914509e3a76c2d271924 (diff) | |
Add more comments for the isConfigForIdentifiedCarrier()
This is a clean cherry-pick from:
https://android-review.git.corp.google.com/c/platform/frameworks/base/+/642231
Bug:74945742
Test: Compile
Change-Id: Ife3fdf797ca8877ec495d61a8aeed56fa20282a7
Merged-in: Ife3fdf797ca8877ec495d61a8aeed56fa20282a7
(cherry picked from commit cea0d8d4883c94482d936abd4d097617921c6fa7)
| -rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index eebe2a196c66..c79eec081349 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2227,7 +2227,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. * * <p>Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} @@ -2254,7 +2256,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. * * <p>Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} @@ -2283,6 +2287,9 @@ public class CarrierConfigManager { * <p> * 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. * </p> * * @param bundle the configuration bundle to be checked. |