am a6a1c52f: Merge "Use Telecom API for checking if a number is voicemail (1/2)" into lmp-sprout-dev
* commit 'a6a1c52f58f24194de2665bb922577a9d7f6dccf': Use Telecom API for checking if a number is voicemail (1/2)
This commit is contained in:
@@ -643,6 +643,27 @@ public class TelecomManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether a given phone number is the configured voicemail number for a
|
||||||
|
* particular phone account.
|
||||||
|
*
|
||||||
|
* @param accountHandle The handle for the account to check the voicemail number against
|
||||||
|
* @param number The number to look up.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public boolean isVoiceMailNumber(PhoneAccountHandle accountHandle, String number) {
|
||||||
|
try {
|
||||||
|
if (isServiceConnected()) {
|
||||||
|
return getTelecomService().isVoiceMailNumber(accountHandle, number);
|
||||||
|
}
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.e(TAG, "RemoteException calling isInCall().", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether there is an ongoing phone call (can be in dialing, ringing, active or holding
|
* Returns whether there is an ongoing phone call (can be in dialing, ringing, active or holding
|
||||||
* states).
|
* states).
|
||||||
|
|||||||
@@ -114,6 +114,11 @@ interface ITelecomService {
|
|||||||
*/
|
*/
|
||||||
void clearAccounts(String packageName);
|
void clearAccounts(String packageName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see TelecomServiceImpl#isVoiceMailNumber
|
||||||
|
*/
|
||||||
|
boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see TelecomServiceImpl#getDefaultPhoneApp
|
* @see TelecomServiceImpl#getDefaultPhoneApp
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user