Class ShadowTelecomManager
@Implements(value=android.telecom.TelecomManager.class, minSdk=21) public class ShadowTelecomManager extends Object
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShadowTelecomManager.CallRecordDeprecated.static classShadowTelecomManager.CallRequestModeMode describing how the shadow handles incoming (TelecomManager.addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle)) and outgoing (TelecomManager.placeCall(android.net.Uri, android.os.Bundle)) call requests.static classShadowTelecomManager.IncomingCallRecordDetails about an incoming call request made viaTelecomManager.addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle).static classShadowTelecomManager.OutgoingCallRecordDetails about an outgoing call request made viaTelecomManager.placeCall(android.net.Uri, android.os.Bundle).static classShadowTelecomManager.UnknownCallRecordDetails about an unknown call request made viaTelecomManager.addNewUnknownCall(android.telecom.PhoneAccountHandle, android.os.Bundle). - 
Constructor Summary
Constructors Constructor Description ShadowTelecomManager() - 
Method Summary
 
- 
Constructor Details
- 
ShadowTelecomManager
public ShadowTelecomManager() 
 - 
 - 
Method Details
- 
getCallRequestMode
 - 
setCallRequestMode
 - 
setDefaultOutgoingPhoneAccount
Set default outgoing phone account to be returned fromgetDefaultOutgoingPhoneAccount(String)for correspondinguriScheme. - 
removeDefaultOutgoingPhoneAccount
Remove default outgoing phone account for correspondinguriScheme. - 
getDefaultOutgoingPhoneAccount
Returns default outgoing phone account set throughsetDefaultOutgoingPhoneAccount(String, PhoneAccountHandle)for correspondinguriScheme. - 
getUserSelectedOutgoingPhoneAccount
 - 
setUserSelectedOutgoingPhoneAccount
@Implementation @HiddenApi public void setUserSelectedOutgoingPhoneAccount(PhoneAccountHandle accountHandle) - 
getSimCallManager
 - 
getSimCallManager
 - 
getConnectionManager
 - 
getPhoneAccountsSupportingScheme
@Implementation @HiddenApi public List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(String uriScheme) - 
getCallCapablePhoneAccounts
 - 
getCallCapablePhoneAccounts
@Implementation(minSdk=23) @HiddenApi public List<PhoneAccountHandle> getCallCapablePhoneAccounts(boolean includeDisabledAccounts) - 
getSelfManagedPhoneAccounts
 - 
getPhoneAccountsForPackage
 - 
getPhoneAccount
 - 
getAllPhoneAccountsCount
 - 
getAllPhoneAccounts
 - 
getAllPhoneAccountHandles
 - 
registerPhoneAccount
 - 
unregisterPhoneAccount
 - 
clearAccounts
Deprecated. - 
clearAccountsForPackage
 - 
getDefaultPhoneApp
Deprecated. - 
getDefaultDialerPackage
 - 
setDefaultDialer
@Deprecated @Implementation(minSdk=23) @HiddenApi public boolean setDefaultDialer(String packageName)Deprecated.API deprecated since Q, for testing, use setDefaultDialerPackage instead - 
setDefaultDialerPackage
Set returned value ofgetDefaultDialerPackage(). - 
getSystemDialerPackage
 - 
setSystemDialerPackage
Set returned value ofgetSystemDialerPackage(). - 
setVoicemailNumber
 - 
isVoiceMailNumber
@Implementation(minSdk=23) protected boolean isVoiceMailNumber(PhoneAccountHandle accountHandle, String number) - 
getVoiceMailNumber
 - 
getLine1Number
 - 
setIsInCall
public void setIsInCall(boolean isInCall)Sets the return value forTelecomManager.isInCall(). - 
isInCall
Overrides behavior ofTelecomManager.isInCall()to return pre-set result.- Returns:
 - Value set by calling 
setIsInCall(boolean). If setIsInCall has not previously been called, will return false. 
 - 
getCallState
 - 
isRinging
 - 
endCall
 - 
acceptRingingCall
 - 
silenceRinger
 - 
isTtySupported
 - 
setTtySupported
public void setTtySupported(boolean isSupported)Sets the value to be returned byisTtySupported(). - 
getCurrentTtyMode
 - 
addNewIncomingCall
 - 
getAllIncomingCalls
 - 
getLastIncomingCall
 - 
getOnlyIncomingCall
 - 
allowIncomingCall
Allows anShadowTelecomManager.IncomingCallRecordcreated viaTelecomManager.addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle).Specifically, this method sets up the relevant
ConnectionServiceand returns the result ofConnectionService.onCreateIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest). - 
denyIncomingCall
Denies anShadowTelecomManager.IncomingCallRecordcreated viaTelecomManager.addNewIncomingCall(android.telecom.PhoneAccountHandle, android.os.Bundle).Specifically, this method sets up the relevant
ConnectionServiceand callsConnectionService.onCreateIncomingConnectionFailed(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest). - 
placeCall
 - 
getAllOutgoingCalls
 - 
getLastOutgoingCall
 - 
getOnlyOutgoingCall
 - 
allowOutgoingCall
Allows anShadowTelecomManager.OutgoingCallRecordcreated viaTelecomManager.placeCall(android.net.Uri, android.os.Bundle).Specifically, this method sets up the relevant
ConnectionServiceand returns the result ofConnectionService.onCreateOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest). - 
denyOutgoingCall
Denies anShadowTelecomManager.OutgoingCallRecordcreated viaTelecomManager.placeCall(android.net.Uri, android.os.Bundle).Specifically, this method sets up the relevant
ConnectionServiceand callsConnectionService.onCreateOutgoingConnectionFailed(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest). - 
addNewUnknownCall
@Implementation @HiddenApi public void addNewUnknownCall(PhoneAccountHandle phoneAccount, Bundle extras) - 
getAllUnknownCalls
 - 
getLastUnknownCall
 - 
getOnlyUnknownCall
 - 
handleMmi
 - 
handleMmi
@Implementation(minSdk=23) protected boolean handleMmi(String dialString, PhoneAccountHandle accountHandle) - 
getAdnUriForPhoneAccount
@Implementation(minSdk=22) protected Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle) - 
cancelMissedCallsNotification
 - 
showInCallScreen
 - 
enablePhoneAccount
@Implementation(minSdk=23) @HiddenApi public void enablePhoneAccount(PhoneAccountHandle handle, boolean isEnabled) - 
createManageBlockedNumbersIntent
Returns the intent set bysetManageBlockNumbersIntent(Intent)()} - 
setManageBlockNumbersIntent
Sets the BlockNumbersIntent to be returned bycreateManageBlockedNumbersIntent() - 
setSimCallManager
 - 
newCallAudioState
public CallAudioState newCallAudioState(boolean muted, int route, int supportedRouteMask, BluetoothDevice activeBluetoothDevice, Collection<BluetoothDevice> supportedBluetoothDevices)Creates a newCallAudioState. The real constructor ofCallAudioStateis hidden. - 
createLaunchEmergencyDialerIntent
 
 -