diff options
| author | 2020-10-22 21:49:20 +0000 | |
|---|---|---|
| committer | 2020-10-22 21:49:20 +0000 | |
| commit | dacbfa7ed886905da412a0fe3b1bbf1205c7a044 (patch) | |
| tree | 1e684d02fd0a2651920d4ed12bfbde9be741ac34 | |
| parent | 44eed5a8d90450edbc600a895e50bd61cf8f3d60 (diff) | |
| parent | 4e254916f0e9acff4d9106a99d6974a35ebe8774 (diff) | |
Merge changes from topic "telephonymanager-data-policy" am: 3a14c6bdcc am: 4e254916f0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1469718
Change-Id: Ida4ad72ab7b1e3d7cc34342b5bf78b91b7b5d1c3
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 82 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 16 |
2 files changed, 1 insertions, 97 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 1d812f28182e..ca47b83b20e7 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -12607,7 +12607,7 @@ public class TelephonyManager { * 1) User data is turned on, or * 2) APN is un-metered for this subscription, or * 3) APN type is whitelisted. E.g. MMS is whitelisted if - * {@link #setAlwaysAllowMmsData(boolean)} is turned on. + * {@link #MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED} is enabled. * * @param apnType Value indicating the apn type. Apn types are defined in {@link ApnSetting}. * @return whether data is enabled for a apn type. @@ -13033,86 +13033,6 @@ public class TelephonyManager { } /** - * - * @param allow {@code true} if allowing using data during voice call, {@code false} if - * disallowed. - * - * @return {@code true} if operation is successful. otherwise {@code false}. - * - * @throws SecurityException if the caller doesn't have the permission. - * - * @hide - */ - @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) - public boolean setDataAllowedDuringVoiceCall(boolean allow) { - try { - ITelephony service = getITelephony(); - if (service != null) { - return service.setDataAllowedDuringVoiceCall(getSubId(), allow); - } - } catch (RemoteException ex) { - // This could happen if binder process crashes. - if (!isSystemProcess()) { - ex.rethrowAsRuntimeException(); - } - } - return false; - } - - /** - * Check whether data is allowed during voice call. This is used for allowing data on the - * non-default data SIM. When a voice call is placed on the non-default data SIM on DSDS - * devices, users will not be able to use mobile data. By calling this API, data will be - * temporarily enabled on the non-default data SIM during the life cycle of the voice call. - * - * @return {@code true} if data is allowed during voice call. - * - * @throws SecurityException if the caller doesn't have the permission. - * - * @hide - */ - @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) - public boolean isDataAllowedInVoiceCall() { - try { - ITelephony service = getITelephony(); - if (service != null) { - return service.isDataAllowedInVoiceCall(getSubId()); - } - } catch (RemoteException ex) { - // This could happen if binder process crashes. - if (!isSystemProcess()) { - ex.rethrowAsRuntimeException(); - } - } - return false; - } - - /** - * Set whether the specific sim card always allows MMS connection. If true, MMS network - * request will be accepted by telephony even if user turns "mobile data" off - * on this specific sim card. - * - * @param alwaysAllow whether Mms data is always allowed. - * @return whether operation is successful. - * - * @hide - */ - @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) - public boolean setAlwaysAllowMmsData(boolean alwaysAllow) { - try { - ITelephony service = getITelephony(); - if (service != null) { - return service.setAlwaysAllowMmsData(getSubId(), alwaysAllow); - } - } catch (RemoteException ex) { - if (!isSystemProcess()) { - ex.rethrowAsRuntimeException(); - } - } - return false; - } - - /** * The IccLock state or password was changed successfully. * @hide */ diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 7d873b6eecb7..5c31c46f293c 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -2238,22 +2238,6 @@ interface ITelephony { boolean isMobileDataPolicyEnabled(int subscriptionId, int policy); /** - * Set allowing mobile data during voice call. - */ - boolean setDataAllowedDuringVoiceCall(int subId, boolean allow); - - /** - * Check whether data is allowed during voice call. Note this is for dual sim device that - * data might be disabled on non-default data subscription but explicitly turned on by settings. - */ - boolean isDataAllowedInVoiceCall(int subId); - - /** - * Set whether a subscription always allows MMS connection. - */ - boolean setAlwaysAllowMmsData(int subId, boolean allow); - - /** * Command line command to enable or disable handling of CEP data for test purposes. */ oneway void setCepEnabled(boolean isCepEnabled); |