Package org.robolectric.shadows
Class ShadowCarrierConfigManager
java.lang.Object
org.robolectric.shadows.ShadowCarrierConfigManager
@Implements(value=android.telephony.CarrierConfigManager.class,
minSdk=23)
public class ShadowCarrierConfigManager
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetConfigForSubId
(int subId) ReturnsPersistableBundle
previously set byoverrideConfig(int, android.os.PersistableBundle)
orsetConfigForSubId(int, PersistableBundle)
, or default values for an invalidsubId
.getConfigForSubId
(int subId, String... keys) ReturnsPersistableBundle
containing the specified keys for a particular subscription.protected void
overrideConfig
(int subId, PersistableBundle config) Overrides the carrier config of the provided subscription ID with the provided values.static void
reset()
void
setConfigForSubId
(int subId, PersistableBundle config) Sets that theconfig
PersistableBundle for a particularsubId
; controls the return value ofCarrierConfigManager#getConfigForSubId()
.void
setReadPhoneStatePermission
(boolean readPhoneStatePermission)
-
Constructor Details
-
ShadowCarrierConfigManager
public ShadowCarrierConfigManager()
-
-
Method Details
-
reset
-
getConfigForSubId
ReturnsPersistableBundle
previously set byoverrideConfig(int, android.os.PersistableBundle)
orsetConfigForSubId(int, PersistableBundle)
, or default values for an invalidsubId
. -
getConfigForSubId
ReturnsPersistableBundle
containing the specified keys for a particular subscription.setConfigForSubId(int, PersistableBundle)
, or default values for an invalidsubId
. -
setReadPhoneStatePermission
public void setReadPhoneStatePermission(boolean readPhoneStatePermission) -
setConfigForSubId
Sets that theconfig
PersistableBundle for a particularsubId
; controls the return value ofCarrierConfigManager#getConfigForSubId()
. -
overrideConfig
@Implementation(minSdk=29) @HiddenApi protected void overrideConfig(int subId, PersistableBundle config) Overrides the carrier config of the provided subscription ID with the provided values.This method will NOT check if
overrideValues
contains valid values for specified config keys.
-