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

Commit 239d777a authored by Vineeta Srivastava's avatar Vineeta Srivastava Committed by Android Git Automerger
Browse files

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

* commit 'fe7270b5':
  SAP: Do not send padding when packet size is mutiple of 4
parents 2a79829f fe7270b5
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 */