summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom/TelecomManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'telecomm/java/android/telecom/TelecomManager.java')
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 168ac41..ed221d2 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -644,6 +644,27 @@ public class TelecomManager {
}
/**
+ * 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
* states).
* <p>