Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bbeeb38 authored by ironydelerium's avatar ironydelerium Committed by Daniel Jacob Chittoor
Browse files

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: default avatarSarah Vandomelen <sarah@sightworks.com>
Change-Id: I1d4c2816fb8891cf5b75058bfe5f1eea960e901b
parent f19deb6e
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2317,6 +2317,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}.