am fa53c934: Merge "Use TelecomManager to call TelephonyManager#getVoicemailNumber (1/2)" into lmp-mr1-dev
* commit 'fa53c93462ba273fb645831422c74d29e748519c': Use TelecomManager to call TelephonyManager#getVoicemailNumber (1/2)
This commit is contained in:
@@ -731,6 +731,26 @@ public class TelecomManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether a given phone account has a voicemail number configured.
|
||||||
|
*
|
||||||
|
* @param accountHandle The handle for the account to check for a voicemail number.
|
||||||
|
* @return {@code true} If the given phone account has a voicemail number.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public boolean hasVoiceMailNumber(PhoneAccountHandle accountHandle) {
|
||||||
|
try {
|
||||||
|
if (isServiceConnected()) {
|
||||||
|
return getTelecomService().hasVoiceMailNumber(accountHandle);
|
||||||
|
}
|
||||||
|
} 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).
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ interface ITelecomService {
|
|||||||
*/
|
*/
|
||||||
boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number);
|
boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see TelecomServiceImpl#hasVoiceMailNumber
|
||||||
|
*/
|
||||||
|
boolean hasVoiceMailNumber(in PhoneAccountHandle accountHandle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see TelecomServiceImpl#getDefaultPhoneApp
|
* @see TelecomServiceImpl#getDefaultPhoneApp
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user