Add methods for device telephony configs.
+ Expose method for whether DTMF length can be changed. + Expose method for whether the device is a world phone. Bug: 19372734 Change-Id: I542e87cab1924eb600fdce929f5227e36112964b
This commit is contained in:
@@ -3717,6 +3717,34 @@ public class TelephonyManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
@@ -863,10 +863,24 @@ 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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user