1
0
mirror of https://github.com/yurisieucuti/treble_evolution.git synced 2024-11-24 08:36:19 +00:00
treble_evolution/patches/platform_frameworks_opt_telephony/0004-Reintroduce-public-void-TelephonyMetrics.writeRilSen.patch
2024-04-24 15:13:17 +00:00

47 lines
2.0 KiB
Diff

From c9030303cfca984bf6650f5ca73fecadf9b09625 Mon Sep 17 00:00:00 2001
From: ironydelerium <42721860+ironydelerium@users.noreply.github.com>
Date: Fri, 31 Dec 2021 02:20:28 -0800
Subject: [PATCH 04/16] Reintroduce 'public void
TelephonyMetrics.writeRilSendSms(int, int, int, int)'. (#8)
The MediaTek IMS package for Android Q, at the very least (likely for the rest, too)
invoke this method in their `sendSms` method; Google, in their infinite wisdom,
decided that this method needed a message ID passed in as well, changing the signature
to 'public void TelephonyMetrics.writeRilSendSms(int, int, int, int, long)' and resulting
in a MethodNotFoundException being raised in com.mediatek.ims, crashing it.
Fixes https://github.com/phhusson/treble_experimentations/issues/2125.
Co-authored-by: Sarah Vandomelen <sarah@sightworks.com>
---
.../telephony/metrics/TelephonyMetrics.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
index 3fdbfe0ed7..fb8011c3df 100644
--- a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
+++ b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
@@ -2320,6 +2320,19 @@ public class TelephonyMetrics {
smsSession.increaseExpectedResponse();
}
+ /**
+ * Write Send SMS event (backwards-compatible method for R and earlier IMS implementations)
+ *
+ * @param phoneId Phone id
+ * @param rilSerial RIL request serial number
+ * @param tech SMS RAT
+ * @param format SMS format. Either {@link SmsMessage#FORMAT_3GPP} or
+ * {@link SmsMessage#FORMAT_3GPP2}.
+ */
+ public void writeRilSendSms(int phoneId, int rilSerial, int tech, int format) {
+ writeRilSendSms(phoneId, rilSerial, tech, format, 0);
+ }
+
/**
* Write Send SMS event using ImsService. Expecting response from
* {@link #writeOnSmsSolicitedResponse}.
--
2.25.1