blob: 29020f613063032e8b6e1bfdf95f0cfece77f222 [file] [log] [blame]
From fcb73a7bdf4c39bfd3f22c2fef324d5c82679263 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 26 Feb 2019 23:13:21 +0100
Subject: [PATCH 5/5] Add a property to force all APNs to be modemCognitive.
Needed on some MTK modems
Change-Id: I111f1375f3f11e81251eaf782c84a0bef345366c
Conflicts:
src/java/com/android/internal/telephony/dataconnection/DcTracker.java
---
.../internal/telephony/dataconnection/DcTracker.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
index 7de9392a9..bb935547d 100644
--- a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
+++ b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
@@ -3336,12 +3336,14 @@ public class DcTracker extends Handler {
notifyOffApnsOfAvailability(reason);
}
- protected void setDataProfilesAsNeeded() {
+ private void setDataProfilesAsNeeded() {
+ boolean forceCognitive = SystemProperties.getBoolean("persist.sys.phh.radio.force_cognitive", false);
+
if (DBG) log("setDataProfilesAsNeeded");
if (mAllApnSettings != null && !mAllApnSettings.isEmpty()) {
ArrayList<DataProfile> dps = new ArrayList<DataProfile>();
for (ApnSetting apn : mAllApnSettings) {
- if (apn.modemCognitive) {
+ if (apn.modemCognitive || forceCognitive) {
DataProfile dp = createDataProfile(apn);
if (!dps.contains(dp)) {
dps.add(dp);
--
2.17.1