diff options
| author | 2017-04-25 23:40:54 +0000 | |
|---|---|---|
| committer | 2017-04-25 23:40:54 +0000 | |
| commit | a086824e5af77b22a9856f3ee47194cbd2a1d8cc (patch) | |
| tree | a02b60af909cb58da45f8913069d234b1066eea9 | |
| parent | f729fccde9763c91244911c4e173a04fc219af6a (diff) | |
| parent | 3a8ad81ab42f030526cdf54d59a170d74478993e (diff) | |
Merge "Create Public API which exposes if the device is in a state where simultaneous voice and data are possible."
am: 3a8ad81ab4
Change-Id: I54d5ac5a02b4bb0e0bd9d3f3eb2428613c40c1ec
| -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 8894f97dc9e0..46de4dde43b4 100644 --- a/api/current.txt +++ b/api/current.txt @@ -38219,6 +38219,7 @@ package android.telephony { method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String, int); 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 3a3ba966ce52..aefa0fe4b973 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -41436,6 +41436,7 @@ package android.telephony { method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String, int); 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 88b3c2f486c6..74a7bf9485e7 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -38318,6 +38318,7 @@ package android.telephony { method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String, int); 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 5d222d425918..5a848d956f5d 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -5087,6 +5087,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 6b9c81d6cfed..6de62de866f2 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -492,6 +492,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); |