@Implements(value=android.telephony.TelephonyManager.class) public class ShadowTelephonyManager extends java.lang.Object
Constructor and Description |
---|
ShadowTelephonyManager() |
Modifier and Type | Method and Description |
---|---|
java.util.List<android.telephony.CellInfo> |
getAllCellInfo() |
int |
getCallState()
Call state may be specified via
setCallState(int) . |
protected android.os.PersistableBundle |
getCarrierConfig() |
android.telephony.CellLocation |
getCellLocation() |
java.lang.String |
getDeviceId() |
int |
getEventFlags()
Deprecated.
Avoid using.
|
java.lang.String |
getGroupIdLevel1() |
java.lang.String |
getLine1Number() |
android.telephony.PhoneStateListener |
getListener()
Deprecated.
Avoid using.
|
java.lang.String |
getNetworkCountryIso() |
java.lang.String |
getNetworkOperator() |
java.lang.String |
getNetworkOperatorName() |
int |
getNetworkType() |
int |
getPhoneType() |
java.lang.String |
getSimCountryIso() |
java.lang.String |
getSimOperator() |
java.lang.String |
getSimOperatorName() |
int |
getSimState() |
protected boolean |
isSmsCapable() |
void |
listen(android.telephony.PhoneStateListener listener,
int flags) |
void |
setAllCellInfo(java.util.List<android.telephony.CellInfo> allCellInfo) |
void |
setCallState(int callState)
Sets the current call state to the desired state and updates any listeners.
|
void |
setCallState(int callState,
java.lang.String incomingPhoneNumber)
Sets the current call state with the option to specify an incoming phone number for the CALL_STATE_RINGING state.
|
void |
setCellLocation(android.telephony.CellLocation cellLocation) |
void |
setDeviceId(java.lang.String newDeviceId) |
void |
setGroupIdLevel1(java.lang.String groupIdLevel1) |
void |
setIsSmsCapable(boolean isSmsCapable)
Sets the value returned by
TelephonyManager.isSmsCapable() . |
void |
setLine1Number(java.lang.String line1Number) |
void |
setNetworkCountryIso(java.lang.String networkCountryIso) |
void |
setNetworkOperator(java.lang.String networkOperator) |
void |
setNetworkOperatorName(java.lang.String networkOperatorName) |
void |
setNetworkType(int networkType) |
void |
setPhoneType(int phoneType) |
void |
setReadPhoneStatePermission(boolean readPhoneStatePermission) |
void |
setSimCountryIso(java.lang.String simCountryIso) |
void |
setSimOperator(java.lang.String simOperator) |
void |
setSimOperatorName(java.lang.String simOperatorName) |
void |
setSimState(int simState) |
@Implementation public void listen(android.telephony.PhoneStateListener listener, int flags)
@Deprecated public android.telephony.PhoneStateListener getListener()
Returns the most recent listener passed to #listen().
@Deprecated public int getEventFlags()
Returns the most recent flags passed to #listen().
@Implementation public int getCallState()
Call state may be specified via setCallState(int)
.
public void setCallState(int callState)
Sets the current call state to the desired state and updates any listeners.
public void setCallState(int callState, java.lang.String incomingPhoneNumber)
Sets the current call state with the option to specify an incoming phone number for the CALL_STATE_RINGING state. The incoming phone number will be ignored for all other cases.
@Implementation public java.lang.String getDeviceId()
public void setDeviceId(java.lang.String newDeviceId)
public void setNetworkOperatorName(java.lang.String networkOperatorName)
@Implementation public java.lang.String getNetworkOperatorName()
public void setNetworkCountryIso(java.lang.String networkCountryIso)
@Implementation public java.lang.String getNetworkCountryIso()
public void setNetworkOperator(java.lang.String networkOperator)
@Implementation public java.lang.String getNetworkOperator()
@Implementation public java.lang.String getSimOperator()
public void setSimOperator(java.lang.String simOperator)
@Implementation public java.lang.String getSimOperatorName()
public void setSimOperatorName(java.lang.String simOperatorName)
@Implementation public java.lang.String getSimCountryIso()
public void setSimCountryIso(java.lang.String simCountryIso)
@Implementation public int getSimState()
public void setSimState(int simState)
public void setReadPhoneStatePermission(boolean readPhoneStatePermission)
@Implementation public int getPhoneType()
public void setPhoneType(int phoneType)
@Implementation public java.lang.String getLine1Number()
public void setLine1Number(java.lang.String line1Number)
@Implementation public int getNetworkType()
public void setNetworkType(int networkType)
@Implementation(minSdk=17) public java.util.List<android.telephony.CellInfo> getAllCellInfo()
public void setAllCellInfo(java.util.List<android.telephony.CellInfo> allCellInfo)
@Implementation public android.telephony.CellLocation getCellLocation()
public void setCellLocation(android.telephony.CellLocation cellLocation)
@Implementation(minSdk=18) public java.lang.String getGroupIdLevel1()
public void setGroupIdLevel1(java.lang.String groupIdLevel1)
@Implementation protected boolean isSmsCapable()
true
by default, or the value specified via setIsSmsCapable(boolean)
public void setIsSmsCapable(boolean isSmsCapable)
Sets the value returned by TelephonyManager.isSmsCapable()
.
@Implementation protected android.os.PersistableBundle getCarrierConfig()