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

Commit e7ca493c authored by Vineeta Srivastava's avatar Vineeta Srivastava Committed by Android (Google) Code Review
Browse files

Merge "SAP: Do not send padding when packet size is mutiple of 4" into mnc-dr-dev

parents f4fb0131 6a1af21c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -643,10 +643,12 @@ public class SapMessage {

        /* Payload */
        os.write(value);
        for(int i = 0, n = 4 - (value.length % 4) ; i < n; i++) {
        if (value.length % 4 != 0) {
            for (int i = 0; i < (4 - (value.length % 4)); ++i) {
                os.write(0); // Padding
            }
        }
    }

    public void write(OutputStream os) throws IOException {
        /* Write the header */