Sync up to v300.i
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From 0c26ab9bf431940096a0cf363363b7c9a8da2d71 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 13 Oct 2019 17:21:31 +0800
|
||||
Subject: [PATCH] telephony: forward-port support for forceCognitive
|
||||
|
||||
* This is needed on some MTK devices. Android 10 refactored some code,
|
||||
so now the "non-persistent/cognitive" filter is relocated to RIL and
|
||||
also in DcTracker.setupData().
|
||||
|
||||
Change-Id: I5e93cbef317b7973e0dc1125cfc3cc576a1cf9fa
|
||||
---
|
||||
src/java/com/android/internal/telephony/RIL.java | 4 +++-
|
||||
.../android/internal/telephony/dataconnection/DcTracker.java | 3 ++-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java
|
||||
index 76ea3abe1..cbde5d850 100644
|
||||
--- a/src/java/com/android/internal/telephony/RIL.java
|
||||
+++ b/src/java/com/android/internal/telephony/RIL.java
|
||||
@@ -66,6 +66,7 @@ import android.os.HwBinder;
|
||||
import android.os.Message;
|
||||
import android.os.PowerManager;
|
||||
import android.os.PowerManager.WakeLock;
|
||||
+import android.os.SystemProperties;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
@@ -4476,7 +4477,8 @@ public class RIL extends BaseCommands implements CommandsInterface {
|
||||
for (DataProfile dp : dps) {
|
||||
// For v1.0 to v1.2, we only send data profiles that has the persistent
|
||||
// (a.k.a modem cognitive) bit set to true.
|
||||
- if (dp.isPersistent()) {
|
||||
+ boolean forceCognitive = SystemProperties.getBoolean("persist.sys.phh.radio.force_cognitive", false);
|
||||
+ if (dp.isPersistent() || forceCognitive) {
|
||||
dpis.add(convertToHalDataProfile10(dp));
|
||||
}
|
||||
}
|
||||
diff --git a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
|
||||
index 7b1560ffb..6920911e3 100644
|
||||
--- a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
|
||||
+++ b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
|
||||
@@ -1955,8 +1955,9 @@ public class DcTracker extends Handler {
|
||||
}
|
||||
|
||||
// profile id is only meaningful when the profile is persistent on the modem.
|
||||
+ boolean forceCognitive = SystemProperties.getBoolean("persist.sys.phh.radio.force_cognitive", false);
|
||||
int profileId = DATA_PROFILE_INVALID;
|
||||
- if (apnSetting.isPersistent()) {
|
||||
+ if (apnSetting.isPersistent() || forceCognitive) {
|
||||
profileId = apnSetting.getProfileId();
|
||||
if (profileId == DATA_PROFILE_DEFAULT) {
|
||||
profileId = getApnProfileID(apnContext.getApnType());
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Reference in New Issue
Block a user