diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-06-02 18:52:06 +0100 |
---|---|---|
committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-06-02 18:54:02 +0100 |
commit | 50a85fea2aaf8fc01613e61090fe18c5116032b3 (patch) | |
tree | 05379b7a2dc20e6954f49840273469fb7ac6b9ad /src/com/android/mms/service | |
parent | ff770690bb17ee8431de581c3688bda5d49868df (diff) | |
download | android_packages_services_Mms-50a85fea2aaf8fc01613e61090fe18c5116032b3.tar.gz android_packages_services_Mms-50a85fea2aaf8fc01613e61090fe18c5116032b3.tar.bz2 android_packages_services_Mms-50a85fea2aaf8fc01613e61090fe18c5116032b3.zip |
Revert "MmsRequest: Turn on data for the MMS transaction if required"
I missed the fact that config_enable_mms_with_mobile_data_off already
exists in f/o/t. This is redundant.
This reverts commit ff770690bb17ee8431de581c3688bda5d49868df.
Change-Id: I1723b4fcd8e34fb499d73bc0881a4a55ca6e2cc8
Diffstat (limited to 'src/com/android/mms/service')
-rw-r--r-- | src/com/android/mms/service/MmsRequest.java | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/com/android/mms/service/MmsRequest.java b/src/com/android/mms/service/MmsRequest.java index c852345..badcca1 100644 --- a/src/com/android/mms/service/MmsRequest.java +++ b/src/com/android/mms/service/MmsRequest.java @@ -141,12 +141,6 @@ public abstract class MmsRequest { int result = SmsManager.MMS_ERROR_UNSPECIFIED; int httpStatusCode = 0; byte[] response = null; - // Was the data state forcefully toggled for this? - boolean dataEnablementRequired = false; - final boolean allowDataEnablement = - mContext.getResources().getBoolean(R.bool.enable_data_for_mms); - final TelephonyManager telephonyManager = - (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); mDataSubId = getDefaultDataSubId(); // TODO: add mms data channel check back to fast fail if no way to send mms, @@ -159,12 +153,6 @@ public abstract class MmsRequest { result = SmsManager.MMS_ERROR_IO_ERROR; } else { // Execute int retryTimes = RETRY_TIMES; - - // If the subscription has data disabled, bring it up - if (allowDataEnablement && !telephonyManager.getDataEnabled(mSubId)) { - dataEnablementRequired = true; - } - if (getDefaultDataSubId() != mSubId) { setDefaultDataSubId(mSubId); // Give the switch some time to happen @@ -180,9 +168,6 @@ public abstract class MmsRequest { // Try multiple times of MMS HTTP request for (int i = 0; i < retryTimes; i++) { try { - if (dataEnablementRequired) { - telephonyManager.setDataEnabled(mSubId, true); - } networkManager.acquireNetwork(requestId); final String apnName = networkManager.getApnName(); LogUtil.d(requestId, "APN name is " + apnName); @@ -207,9 +192,6 @@ public abstract class MmsRequest { break; } finally { networkManager.releaseNetwork(requestId); - if (dataEnablementRequired) { - telephonyManager.setDataEnabled(mSubId, false); - } } } catch (ApnException e) { LogUtil.e(requestId, "APN failure", e); |