Loading api/current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -39753,6 +39753,7 @@ package android.telephony { public class CarrierConfigManager { public class CarrierConfigManager { method public android.os.PersistableBundle getConfig(); method public android.os.PersistableBundle getConfig(); method public android.os.PersistableBundle getConfigForSubId(int); method public android.os.PersistableBundle getConfigForSubId(int); method public static boolean isConfigForIdentifiedCarrier(android.os.PersistableBundle); method public void notifyConfigChangedForSubId(int); method public void notifyConfigChangedForSubId(int); field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; field public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2; // 0xfffffffe field public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2; // 0xfffffffe telephony/java/android/telephony/CarrierConfigManager.java +35 −0 Original line number Original line Diff line number Diff line Loading @@ -1712,6 +1712,13 @@ public class CarrierConfigManager { public static final String KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL = public static final String KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL = "spn_display_rule_use_roaming_from_service_state_bool"; "spn_display_rule_use_roaming_from_service_state_bool"; /** * Determines whether any carrier has been identified and its specific config has been applied, * default to false. * @hide */ public static final String KEY_CARRIER_CONFIG_APPLIED_BOOL = "carrier_config_applied_bool"; /** The default value for every variable. */ /** The default value for every variable. */ private final static PersistableBundle sDefaults; private final static PersistableBundle sDefaults; Loading Loading @@ -1995,6 +2002,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL, false); sDefaults.putBoolean(KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL, false); sDefaults.putBoolean(KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL, false); sDefaults.putBoolean(KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL, false); sDefaults.putBoolean(KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL, false); sDefaults.putBoolean(KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL, false); } } /** /** Loading Loading @@ -2039,6 +2047,33 @@ public class CarrierConfigManager { return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId()); return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId()); } } /** * Determines whether a configuration {@link PersistableBundle} obtained from * {@link #getConfig()} or {@link #getConfigForSubId(int)} corresponds to an identified carrier. * <p> * When an app receives the {@link CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED} * broadcast which informs it that the carrier configuration has changed, it is possible * that another reload of the carrier configuration has begun since the intent was sent. * In this case, the carrier configuration the app fetches (e.g. via {@link #getConfig()}) * may not represent the configuration for the current carrier. It should be noted that it * does not necessarily mean the configuration belongs to current carrier when this function * return true because it may belong to another previous identified carrier. Users should * always call {@link #getConfig()} or {@link #getConfigForSubId(int)} after receiving the * broadcast {@link #ACTION_CARRIER_CONFIG_CHANGED}. * </p> * <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. * </p> * * @param bundle the configuration bundle to be checked. * @return boolean true if any carrier specific configuration bundle has been applied, false * otherwise or the bundle is null. */ public static boolean isConfigForIdentifiedCarrier(PersistableBundle bundle) { return bundle != null && bundle.getBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL); } /** /** * Calling this method triggers telephony services to fetch the current carrier configuration. * Calling this method triggers telephony services to fetch the current carrier configuration. * <p> * <p> Loading Loading
api/current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -39753,6 +39753,7 @@ package android.telephony { public class CarrierConfigManager { public class CarrierConfigManager { method public android.os.PersistableBundle getConfig(); method public android.os.PersistableBundle getConfig(); method public android.os.PersistableBundle getConfigForSubId(int); method public android.os.PersistableBundle getConfigForSubId(int); method public static boolean isConfigForIdentifiedCarrier(android.os.PersistableBundle); method public void notifyConfigChangedForSubId(int); method public void notifyConfigChangedForSubId(int); field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; field public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2; // 0xfffffffe field public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2; // 0xfffffffe
telephony/java/android/telephony/CarrierConfigManager.java +35 −0 Original line number Original line Diff line number Diff line Loading @@ -1712,6 +1712,13 @@ public class CarrierConfigManager { public static final String KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL = public static final String KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL = "spn_display_rule_use_roaming_from_service_state_bool"; "spn_display_rule_use_roaming_from_service_state_bool"; /** * Determines whether any carrier has been identified and its specific config has been applied, * default to false. * @hide */ public static final String KEY_CARRIER_CONFIG_APPLIED_BOOL = "carrier_config_applied_bool"; /** The default value for every variable. */ /** The default value for every variable. */ private final static PersistableBundle sDefaults; private final static PersistableBundle sDefaults; Loading Loading @@ -1995,6 +2002,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL, false); sDefaults.putBoolean(KEY_IDENTIFY_HIGH_DEFINITION_CALLS_IN_CALL_LOG_BOOL, false); sDefaults.putBoolean(KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL, false); sDefaults.putBoolean(KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL, false); sDefaults.putBoolean(KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL, false); sDefaults.putBoolean(KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL, false); } } /** /** Loading Loading @@ -2039,6 +2047,33 @@ public class CarrierConfigManager { return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId()); return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId()); } } /** * Determines whether a configuration {@link PersistableBundle} obtained from * {@link #getConfig()} or {@link #getConfigForSubId(int)} corresponds to an identified carrier. * <p> * When an app receives the {@link CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED} * broadcast which informs it that the carrier configuration has changed, it is possible * that another reload of the carrier configuration has begun since the intent was sent. * In this case, the carrier configuration the app fetches (e.g. via {@link #getConfig()}) * may not represent the configuration for the current carrier. It should be noted that it * does not necessarily mean the configuration belongs to current carrier when this function * return true because it may belong to another previous identified carrier. Users should * always call {@link #getConfig()} or {@link #getConfigForSubId(int)} after receiving the * broadcast {@link #ACTION_CARRIER_CONFIG_CHANGED}. * </p> * <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. * </p> * * @param bundle the configuration bundle to be checked. * @return boolean true if any carrier specific configuration bundle has been applied, false * otherwise or the bundle is null. */ public static boolean isConfigForIdentifiedCarrier(PersistableBundle bundle) { return bundle != null && bundle.getBoolean(KEY_CARRIER_CONFIG_APPLIED_BOOL); } /** /** * Calling this method triggers telephony services to fetch the current carrier configuration. * Calling this method triggers telephony services to fetch the current carrier configuration. * <p> * <p> Loading