summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-03-06 01:05:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-06 01:05:08 +0000
commit2b84e98e69ec915586963a1f2f3e55bacf210061 (patch)
tree2a8954d280de89aa1680170122c3ee436ac051bb /telephony/java
parent1c20d3cf3fe55ebfeb2c4f5cfaff47ed1112e7aa (diff)
parent67fc92bd444e4d8eee0aa7703980aff9185ea1bd (diff)
downloadframeworks_base-2b84e98e69ec915586963a1f2f3e55bacf210061.zip
frameworks_base-2b84e98e69ec915586963a1f2f3e55bacf210061.tar.gz
frameworks_base-2b84e98e69ec915586963a1f2f3e55bacf210061.tar.bz2
Merge "Add methods for device telephony configs."
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java28
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl16
2 files changed, 43 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 0a4b787..f3b2d2e 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3716,6 +3716,34 @@ public class TelephonyManager {
}
/**
+ * Whether the device supports configuring the DTMF tone length.
+ *
+ * @return {@code true} if the DTMF tone length can be changed, and {@code false} otherwise.
+ */
+ public boolean canChangeDtmfToneLength() {
+ try {
+ return getITelephony().canChangeDtmfToneLength();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#canChangeDtmfToneLength", e);
+ }
+ return false;
+ }
+
+ /**
+ * Whether the device is a world phone.
+ *
+ * @return {@code true} if the device is a world phone, and {@code false} otherwise.
+ */
+ public boolean isWorldPhone() {
+ try {
+ return getITelephony().isWorldPhone();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isWorldPhone", e);
+ }
+ return false;
+ }
+
+ /**
* This function retrieves value for setting "name+subId", and if that is not found
* retrieves value for setting "name", and if that is not found uses def as default
*
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 62c8746..3769dee 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -863,11 +863,25 @@ interface ITelephony {
/**
* Whether video calling has been enabled by the user.
*
- * @return {@code True} if the user has enabled video calling, {@code false} otherwise.
+ * @return {@code true} if the user has enabled video calling, {@code false} otherwise.
*/
boolean isVideoCallingEnabled();
/**
+ * Whether the DTMF tone length can be changed.
+ *
+ * @return {@code true} if the DTMF tone length can be changed.
+ */
+ boolean canChangeDtmfToneLength();
+
+ /**
+ * Whether the device is a world phone.
+ *
+ * @return {@code true} if the devices is a world phone.
+ */
+ boolean isWorldPhone();
+
+ /**
* Get IMS Registration Status
*/
boolean isImsRegistered();