From c4587ed1c9c1ee4a265dfb80ccc35fe02a8cf673 Mon Sep 17 00:00:00 2001 From: Hall Liu Date: Fri, 25 Sep 2020 11:14:29 -0700 Subject: Remove old methods for mobile data Bug: 169367013 Test: builds Change-Id: I9aa69c9bd8d31e6bbdd9a237b0aa2c3922431227 Merged-In: I9aa69c9bd8d31e6bbdd9a237b0aa2c3922431227 --- .../java/android/telephony/TelephonyManager.java | 82 +--------------------- .../com/android/internal/telephony/ITelephony.aidl | 16 ----- 2 files changed, 1 insertion(+), 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. @@ -13032,86 +13032,6 @@ public class TelephonyManager { return false; } - /** - * - * @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 @@ -2237,22 +2237,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. */ -- cgit v1.2.3-59-g8ed1b