Initial commit for Android 10, syncing up to v201
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
From 60d9333099db6587acd48b896d37e9e949fa95dc Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 16 Aug 2018 22:12:46 +0200
|
||||
Subject: [PATCH 1/6] Add route to gateway on null netmask
|
||||
|
||||
Galaxy S9 returns empty prefix
|
||||
|
||||
Change-Id: I8133da8e8f5203666684100009ba658528a02e94
|
||||
---
|
||||
.../dataconnection/DataConnection.java | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/dataconnection/DataConnection.java b/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
|
||||
index 20ccee8c9..f39d01809 100644
|
||||
--- a/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
|
||||
+++ b/src/java/com/android/internal/telephony/dataconnection/DataConnection.java
|
||||
@@ -24,6 +24,7 @@ import android.annotation.Nullable;
|
||||
import android.app.PendingIntent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.KeepalivePacketData;
|
||||
+import android.net.IpPrefix;
|
||||
import android.net.LinkAddress;
|
||||
import android.net.LinkProperties;
|
||||
import android.net.NetworkCapabilities;
|
||||
@@ -1393,6 +1394,22 @@ public class DataConnection extends StateMachine {
|
||||
}
|
||||
|
||||
for (InetAddress gateway : response.getGatewayAddresses()) {
|
||||
+ if(response.getAddresses().size()>0) {
|
||||
+ //TODO:
|
||||
+ // - IPv6
|
||||
+ // - Multiple addresses
|
||||
+ // - Check for non-trivial prefix length
|
||||
+ LinkAddress la = response.getAddresses().get(0);
|
||||
+ if(la.getNetworkPrefixLength() == 32 &&
|
||||
+ gateway instanceof java.net.Inet4Address) {
|
||||
+ if(!gateway.isAnyLocalAddress()) {
|
||||
+ linkProperties.addRoute(new RouteInfo(
|
||||
+ new IpPrefix(gateway, 32),
|
||||
+ InetAddress.getByName("0.0.0.0"),
|
||||
+ response.getInterfaceName()));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
// Allow 0.0.0.0 or :: as a gateway;
|
||||
// this indicates a point-to-point interface.
|
||||
linkProperties.addRoute(new RouteInfo(gateway));
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From e66ddf44169f3dda57d01a9dd5aded920bdc80a9 Mon Sep 17 00:00:00 2001
|
||||
From: Artem Borisov <dedsa2002@gmail.com>
|
||||
Date: Sat, 10 Nov 2018 17:19:17 +0000
|
||||
Subject: [PATCH 2/6] Telephony: Don not call onUssdRelease for Huawei RIL
|
||||
|
||||
Huawei RIL doesn't seem to work properly with USSD_MODE_NW_RELEASE,
|
||||
always releasing USSD when it should be finished instead.
|
||||
Let's explicitly call onUssdFinished in this case.
|
||||
|
||||
Change-Id: I69faed1c51d4582834879975d6ab13daf7f48ad4
|
||||
---
|
||||
src/java/com/android/internal/telephony/GsmCdmaPhone.java | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
|
||||
index 6e539f0ae..14a322747 100644
|
||||
--- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java
|
||||
+++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
|
||||
@@ -2313,7 +2313,11 @@ public class GsmCdmaPhone extends Phone {
|
||||
// Complete pending USSD
|
||||
|
||||
if (isUssdRelease) {
|
||||
- found.onUssdRelease();
|
||||
+ if (SystemProperties.getBoolean("persist.sys.radio.huawei", false)) {
|
||||
+ found.onUssdFinished(ussdMessage, isUssdRequest);
|
||||
+ } else {
|
||||
+ found.onUssdRelease();
|
||||
+ }
|
||||
} else if (isUssdError) {
|
||||
found.onUssdFinishedError();
|
||||
} else {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From e67dac2c25d6a64230a866566fbc2636b2f73bc6 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 28 Dec 2018 13:06:32 +0100
|
||||
Subject: [PATCH 3/6] Make MAX_CONNECTIONS_GSM settable from property
|
||||
|
||||
cf https://github.com/phhusson/treble_experimentations/issues/110
|
||||
|
||||
Change-Id: I5df755535aa5ded704d4c33122d63ac2481bd5f6
|
||||
---
|
||||
src/java/com/android/internal/telephony/GsmCdmaCallTracker.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/GsmCdmaCallTracker.java b/src/java/com/android/internal/telephony/GsmCdmaCallTracker.java
|
||||
index 0a7acee57..aca129308 100755
|
||||
--- a/src/java/com/android/internal/telephony/GsmCdmaCallTracker.java
|
||||
+++ b/src/java/com/android/internal/telephony/GsmCdmaCallTracker.java
|
||||
@@ -64,7 +64,7 @@ public class GsmCdmaCallTracker extends CallTracker {
|
||||
|
||||
//***** Constants
|
||||
|
||||
- public static final int MAX_CONNECTIONS_GSM = 19; //7 allowed in GSM + 12 from IMS for SRVCC
|
||||
+ public static final int MAX_CONNECTIONS_GSM = android.os.SystemProperties.getInt("persist.sys.phh.radio.max_connections_gsm", 19); //7 allowed in GSM + 12 from IMS for SRVCC
|
||||
private static final int MAX_CONNECTIONS_PER_CALL_GSM = 5; //only 5 connections allowed per call
|
||||
|
||||
private static final int MAX_CONNECTIONS_CDMA = 8;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 21952419962b9a642a5312e8258039bbbb5f893b Mon Sep 17 00:00:00 2001
|
||||
From: Dil3mm4 <dil3mm4.dev@gmail.com>
|
||||
Date: Sat, 17 Nov 2018 18:18:42 +0000
|
||||
Subject: [PATCH 4/6] Choose a more generic prop.
|
||||
|
||||
Since USSD it's a problem over MTK too and not only on Kirin, let's be more generic.
|
||||
|
||||
Change-Id: Icf1700f55be40915f9c64059019287f300d81405
|
||||
---
|
||||
src/java/com/android/internal/telephony/GsmCdmaPhone.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
|
||||
index 14a322747..8359a3858 100644
|
||||
--- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java
|
||||
+++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
|
||||
@@ -2313,7 +2313,7 @@ public class GsmCdmaPhone extends Phone {
|
||||
// Complete pending USSD
|
||||
|
||||
if (isUssdRelease) {
|
||||
- if (SystemProperties.getBoolean("persist.sys.radio.huawei", false)) {
|
||||
+ if (SystemProperties.getBoolean("persist.sys.radio.ussd.fix", false)) {
|
||||
found.onUssdFinished(ussdMessage, isUssdRequest);
|
||||
} else {
|
||||
found.onUssdRelease();
|
||||
--
|
||||
2.17.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,45 @@
|
||||
From 5c9753b0fe01bf6b5b025a3c2ad9405e92341fc4 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 7/7] 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().
|
||||
---
|
||||
src/java/com/android/internal/telephony/RIL.java | 3 ++-
|
||||
.../android/internal/telephony/dataconnection/DcTracker.java | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java
|
||||
index 586dd063a..cc8997ccc 100644
|
||||
--- a/src/java/com/android/internal/telephony/RIL.java
|
||||
+++ b/src/java/com/android/internal/telephony/RIL.java
|
||||
@@ -3963,7 +3963,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 7a4bfd8d3..f5c54cc40 100644
|
||||
--- a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
|
||||
+++ b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
|
||||
@@ -1890,8 +1890,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.17.1
|
||||
|
||||
Reference in New Issue
Block a user