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

Commit a6c6f06b authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 186 into donut

* changes:
  eliminate seemingly pointless conversion to and then from hex string
parents 7cf6fa72 e87e9506
Loading
Loading
Loading
Loading
+6 −19
Original line number Diff line number Diff line
@@ -1099,14 +1099,9 @@ public final class SIMRecords extends IccRecords {

            // Note: Data may include trailing FF's.  That's OK; message
            // should still parse correctly.
            byte[] nba = new byte[n - 1];
            System.arraycopy(ba, 1, nba, 0, n - 1);

            String pdu = IccUtils.bytesToHexString(nba);
            // XXX first line is bogus
            SmsMessage message = SmsMessage.newFromCMT(
                                new String[] { "", pdu });

            byte[] pdu = new byte[n - 1];
            System.arraycopy(ba, 1, pdu, 0, n - 1);
            SmsMessage message = SmsMessage.createFromPdu(pdu);

            ((GSMPhone) phone).mSMS.dispatchMessage(message);
        }
@@ -1130,14 +1125,9 @@ public final class SIMRecords extends IccRecords {

                // Note: Data may include trailing FF's.  That's OK; message
                // should still parse correctly.
                byte[] nba = new byte[n - 1];
                System.arraycopy(ba, 1, nba, 0, n - 1);

                String pdu = IccUtils.bytesToHexString(nba);
                // XXX first line is bogus
                SmsMessage message = SmsMessage.newFromCMT(
                        new String[] { "", pdu });

                byte[] pdu = new byte[n - 1];
                System.arraycopy(ba, 1, pdu, 0, n - 1);
                SmsMessage message = SmsMessage.createFromPdu(pdu);

                ((GSMPhone) phone).mSMS.dispatchMessage(message);

@@ -1499,6 +1489,3 @@ public final class SIMRecords extends IccRecords {
    }

}