summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-10-17 00:05:36 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-17 00:05:36 +0000
commitdf385fffe822a7854fb7ce9c5e46ee007646c89e (patch)
treedd2a7d15482c8a534b5853c3f429e9ec1f841000 /telecomm
parent11bac0ed21e67c2282ae6fff38ed026e904571d4 (diff)
parenta6a1c52f58f24194de2665bb922577a9d7f6dccf (diff)
downloadframeworks_base-df385fffe822a7854fb7ce9c5e46ee007646c89e.zip
frameworks_base-df385fffe822a7854fb7ce9c5e46ee007646c89e.tar.gz
frameworks_base-df385fffe822a7854fb7ce9c5e46ee007646c89e.tar.bz2
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)
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java21
-rw-r--r--telecomm/java/com/android/internal/telecom/ITelecomService.aidl5
2 files changed, 26 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>
diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
index f1cf885..91f44b9 100644
--- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
@@ -115,6 +115,11 @@ interface ITelecomService {
void clearAccounts(String packageName);
/**
+ * @see TelecomServiceImpl#isVoiceMailNumber
+ */
+ boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number);
+
+ /**
* @see TelecomServiceImpl#getDefaultPhoneApp
*/
ComponentName getDefaultPhoneApp();