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

Commit 116d890a authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

Fix null data handling in ServiceCommand.writeCommand()

parent 4bca97ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public class ServiceCommand {

    private boolean writeCommand(int cmd, String _data) {
        byte buf[] = new byte[8];
        byte[] data = _data.getBytes();
        byte[] data = (_data == null) ? new byte[0] : _data.getBytes();
        int len = data.length;
        // the length of data
        buf[0] = (byte) (len & 0xff);