CarrierConfigManager.CarrierConfigChangeListener
public
static
interface
CarrierConfigManager.CarrierConfigChangeListener
android.telephony.CarrierConfigManager.CarrierConfigChangeListener |
Listener interface to get a notification when the carrier configurations have changed.
Use this listener to receive timely updates when the carrier configuration changes. System
components should prefer this listener over CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED
whenever possible.
To register the listener, call
CarrierConfigManager.registerCarrierConfigChangeListener(java.util.concurrent.Executor, android.telephony.CarrierConfigManager.CarrierConfigChangeListener)
.
To unregister, call
CarrierConfigManager.unregisterCarrierConfigChangeListener(android.telephony.CarrierConfigManager.CarrierConfigChangeListener)
.
Note that on registration, registrants will NOT receive a notification on last carrier config
change. Only carrier configs change AFTER the registration will be sent to registrants. And
unlike CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED
, notification wouldn't send when the device is
unlocked. Registrants only receive the notification when there has been real carrier config
changes.
See also:
CarrierConfigManager.registerCarrierConfigChangeListener(Executor, CarrierConfigChangeListener)
CarrierConfigManager.unregisterCarrierConfigChangeListener(CarrierConfigChangeListener)
CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED
CarrierConfigManager.getConfig(String)
CarrierConfigManager.getConfigForSubId(int, String)
Summary
Public methods | |
---|---|
abstract
void
|
onCarrierConfigChanged(int logicalSlotIndex, int subscriptionId, int carrierId, int specificCarrierId)
Called when carrier configurations have changed. |
Public methods
onCarrierConfigChanged
public abstract void onCarrierConfigChanged (int logicalSlotIndex, int subscriptionId, int carrierId, int specificCarrierId)
Called when carrier configurations have changed.
Parameters | |
---|---|
logicalSlotIndex |
int : The logical SIM slot index on which to monitor and get
notification. It is guaranteed to be valid. |
subscriptionId |
int : The subscription on the SIM slot. May be
SubscriptionManager.INVALID_SUBSCRIPTION_ID . |
carrierId |
int : The optional carrier Id, may be
TelephonyManager.UNKNOWN_CARRIER_ID .
See TelephonyManager.getSimCarrierId() . |
specificCarrierId |
int : The optional fine-grained carrierId, may be TelephonyManager.UNKNOWN_CARRIER_ID . A specific carrierId may
be different from the carrierId above in a MVNO scenario. See
detail in TelephonyManager.getSimSpecificCarrierId() . |