summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <ricardo@cyngn.com>2016-06-02 18:52:06 +0100
committerRicardo Cerqueira <ricardo@cyngn.com>2016-06-02 18:54:02 +0100
commit50a85fea2aaf8fc01613e61090fe18c5116032b3 (patch)
tree05379b7a2dc20e6954f49840273469fb7ac6b9ad
parentff770690bb17ee8431de581c3688bda5d49868df (diff)
downloadandroid_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
-rw-r--r--res/values/config.xml20
-rw-r--r--src/com/android/mms/service/MmsRequest.java18
2 files changed, 0 insertions, 38 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
deleted file mode 100644
index 399f21c..0000000
--- a/res/values/config.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2016 CyanogenMod
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<resources>
- <bool name="enable_data_for_mms">false</bool>
-</resources>
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);