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

Commit 42ae35b6 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Use public API to get SMS encode data" am: 68fff3b4 am: a9e351c7

Change-Id: Ia47dff09ca9f9864a94991697656e2480aca16f1
parents 08c4cacc a9e351c7
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -520,15 +520,11 @@ public class BluetoothMapSmsPdu {
        int activePhone = context.getSystemService(TelephonyManager.class)
                .getCurrentPhoneType();
        int phoneType;
        GsmAlphabet.TextEncodingDetails ted = (PHONE_TYPE_CDMA == activePhone)
                ? com.android.internal.telephony.cdma.SmsMessage.calculateLength(
                (CharSequence) messageText, false, true)
                : com.android.internal.telephony.gsm.SmsMessage.calculateLength(
                        (CharSequence) messageText, false);
        int[] ted = SmsMessage.calculateLength((CharSequence) messageText, false);

        SmsPdu newPdu;
        String destinationAddress;
        int msgCount = ted.msgCount;
        int msgCount = ted[0];
        int encoding;
        int languageTable;
        int languageShiftTable;
@@ -540,9 +536,9 @@ public class BluetoothMapSmsPdu {

        // Default to GSM, as this code should not be used, if we neither have CDMA not GSM.
        phoneType = (activePhone == PHONE_TYPE_CDMA) ? SMS_TYPE_CDMA : SMS_TYPE_GSM;
        encoding = ted.codeUnitSize;
        languageTable = ted.languageTable;
        languageShiftTable = ted.languageShiftTable;
        encoding = ted[3];
        languageTable = ted[4];
        languageShiftTable = ted[5];
        destinationAddress = PhoneNumberUtils.stripSeparators(address);
        if (destinationAddress == null || destinationAddress.length() < 2) {
            destinationAddress =