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
.protected PersistableBundle
getConfigForSubId
(int subId, String... keys) protected void
overrideConfig
(int subId, PersistableBundle config) Overrides the carrier config of the provided subscription ID with the provided values.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
-
getConfigForSubId
ReturnsPersistableBundle
previously set byoverrideConfig(int, android.os.PersistableBundle)
orsetConfigForSubId(int, PersistableBundle)
, or default values for an invalidsubId
. -
getConfigForSubId
-
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.
-