diff options
author | 2017-01-24 16:47:02 +0000 | |
---|---|---|
committer | 2017-01-24 16:47:05 +0000 | |
commit | dd656b91cc0a44dc4a465677e01bc5026ba35f18 (patch) | |
tree | f7f4bfcb35d8048dc8cd4483bc36890f8f58ff56 | |
parent | 7383ce62ee605891047f4d3c7d86176d6bf24e59 (diff) | |
parent | a28dcbcd871ba3bb1fce4e2e4336712272d640e7 (diff) |
Merge "Create Public API which exposes if the device is in a state where simultaneous voice and data are possible."
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | api/system-current.txt | 1 | ||||
-rw-r--r-- | api/test-current.txt | 1 | ||||
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 14 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 6 |
5 files changed, 23 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt index 34a0eddfc08a..243c78f80bad 100644 --- a/api/current.txt +++ b/api/current.txt @@ -38488,6 +38488,7 @@ package android.telephony { method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String); method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String); method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String); + method public boolean isConcurrentVoiceAndDataAllowed(); method public boolean isHearingAidCompatibilitySupported(); method public boolean isNetworkRoaming(); method public boolean isSmsCapable(); diff --git a/api/system-current.txt b/api/system-current.txt index 8bb7ddc30555..063c3c3a0e34 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -41744,6 +41744,7 @@ package android.telephony { method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String); method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String); method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String); + method public boolean isConcurrentVoiceAndDataAllowed(); method public boolean isDataConnectivityPossible(); method public boolean isHearingAidCompatibilitySupported(); method public boolean isIdle(); diff --git a/api/test-current.txt b/api/test-current.txt index ff6208175ff4..4fcaf6926cae 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -38609,6 +38609,7 @@ package android.telephony { method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String); method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String); method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String); + method public boolean isConcurrentVoiceAndDataAllowed(); method public boolean isHearingAidCompatibilitySupported(); method public boolean isNetworkRoaming(); method public boolean isSmsCapable(); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index a3f7c18f54bd..b28627bf3f74 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -4791,6 +4791,20 @@ public class TelephonyManager { } } + /* + * @return true, if the device is currently on a technology (e.g. UMTS or LTE) which can support + * voice and data simultaneously. This can change based on location or network condition. + */ + public boolean isConcurrentVoiceAndDataAllowed() { + try { + ITelephony telephony = getITelephony(); + return (telephony == null ? false : telephony.isConcurrentVoiceAndDataAllowed(mSubId)); + } catch (RemoteException e) { + Log.e(TAG, "Error calling ITelephony#isConcurrentVoiceAndDataAllowed", e); + } + return false; + } + /** @hide */ @SystemApi public boolean handlePinMmi(String dialString) { diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index c0d6768aece0..9a9a0923bc68 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -466,6 +466,12 @@ interface ITelephony { */ int getVoiceMessageCountForSubscriber(int subId); + /** + * Returns true if current state supports both voice and data + * simultaneously. This can change based on location or network condition. + */ + boolean isConcurrentVoiceAndDataAllowed(int subId); + oneway void setVisualVoicemailEnabled(String callingPackage, in PhoneAccountHandle accountHandle, boolean enabled); |