@Implements(value=android.telecom.TelecomManager.class, minSdk=21) public class ShadowTelecomManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ShadowTelecomManager.CallRecord |
Constructor and Description |
---|
ShadowTelecomManager() |
@Implementation protected PhoneAccountHandle getDefaultOutgoingPhoneAccount(String uriScheme)
@Implementation @HiddenApi public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount()
@Implementation @HiddenApi public void setUserSelectedOutgoingPhoneAccount(PhoneAccountHandle accountHandle)
@Implementation protected PhoneAccountHandle getSimCallManager()
@Implementation(minSdk=23) @HiddenApi public PhoneAccountHandle getSimCallManager(int userId)
@Implementation @HiddenApi public PhoneAccountHandle getConnectionManager()
@Implementation @HiddenApi public List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(String uriScheme)
@Implementation(minSdk=23) protected List<PhoneAccountHandle> getCallCapablePhoneAccounts()
@Implementation(minSdk=23) @HiddenApi public List<PhoneAccountHandle> getCallCapablePhoneAccounts(boolean includeDisabledAccounts)
@Implementation @HiddenApi public List<PhoneAccountHandle> getPhoneAccountsForPackage()
@Implementation protected PhoneAccount getPhoneAccount(PhoneAccountHandle account)
@Implementation @HiddenApi public int getAllPhoneAccountsCount()
@Implementation @HiddenApi public List<PhoneAccount> getAllPhoneAccounts()
@Implementation @HiddenApi public List<PhoneAccountHandle> getAllPhoneAccountHandles()
@Implementation protected void registerPhoneAccount(PhoneAccount account)
@Implementation protected void unregisterPhoneAccount(PhoneAccountHandle accountHandle)
@Deprecated @Implementation @HiddenApi public void clearAccounts()
@Implementation(minSdk=22) @HiddenApi public void clearAccountsForPackage(String packageName)
@Deprecated @Implementation @HiddenApi public ComponentName getDefaultPhoneApp()
@Implementation(minSdk=23) protected String getDefaultDialerPackage()
@Implementation(minSdk=23) @HiddenApi public boolean setDefaultDialer(String packageName)
@Implementation(minSdk=23) @HiddenApi public String getSystemDialerPackage()
@Implementation(minSdk=22) protected boolean isVoiceMailNumber(PhoneAccountHandle accountHandle, String number)
@Implementation(minSdk=23) protected String getVoiceMailNumber(PhoneAccountHandle accountHandle)
@Implementation(minSdk=22) protected String getLine1Number(PhoneAccountHandle accountHandle)
public void setIsInCall(boolean isInCall)
Sets the return value for TelecomManager.isInCall()
.
@Implementation protected boolean isInCall()
Overrides behavior of TelecomManager.isInCall()
to return pre-set result.
setIsInCall(boolean)
. If setIsInCall has not previously been called, will return false.@Implementation @HiddenApi public int getCallState()
@Implementation @HiddenApi public boolean isRinging()
@Implementation @HiddenApi public boolean endCall()
@Implementation protected void acceptRingingCall()
@Implementation protected void silenceRinger()
@Implementation protected boolean isTtySupported()
@Implementation @HiddenApi public int getCurrentTtyMode()
@Implementation protected void addNewIncomingCall(PhoneAccountHandle phoneAccount, Bundle extras)
public List<ShadowTelecomManager.CallRecord> getAllIncomingCalls()
@Implementation @HiddenApi public void addNewUnknownCall(PhoneAccountHandle phoneAccount, Bundle extras)
public List<ShadowTelecomManager.CallRecord> getAllUnknownCalls()
@Implementation protected boolean handleMmi(String dialString)
@Implementation(minSdk=23) protected boolean handleMmi(String dialString, PhoneAccountHandle accountHandle)
@Implementation(minSdk=22) protected Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle)
@Implementation protected void cancelMissedCallsNotification()
@Implementation protected void showInCallScreen(boolean showDialpad)
@Implementation(minSdk=23) protected void placeCall(Uri address, Bundle extras)
@Implementation(minSdk=23) @HiddenApi public void enablePhoneAccount(PhoneAccountHandle handle, boolean isEnabled)
public void setSimCallManager(PhoneAccountHandle simCallManager)