mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +01:00
Merge pull request #1194 from elagin/string_toString
Redundant String.toString()
This commit is contained in:
commit
4a07c63381
@ -528,7 +528,7 @@ public class No1F1Support extends AbstractBTLEDeviceSupport {
|
|||||||
byte[] msg;
|
byte[] msg;
|
||||||
|
|
||||||
// send header
|
// send header
|
||||||
bytes = header.toString().getBytes("EUC-JP");
|
bytes = header.getBytes("EUC-JP");
|
||||||
length = min(bytes.length, 18);
|
length = min(bytes.length, 18);
|
||||||
msg = new byte[length + 2];
|
msg = new byte[length + 2];
|
||||||
msg[0] = No1F1Constants.CMD_NOTIFICATION;
|
msg[0] = No1F1Constants.CMD_NOTIFICATION;
|
||||||
@ -537,7 +537,7 @@ public class No1F1Support extends AbstractBTLEDeviceSupport {
|
|||||||
builder.write(ctrlCharacteristic, msg);
|
builder.write(ctrlCharacteristic, msg);
|
||||||
|
|
||||||
// send body
|
// send body
|
||||||
bytes = header.toString().getBytes("EUC-JP");
|
bytes = header.getBytes("EUC-JP");
|
||||||
length = min(bytes.length, 18);
|
length = min(bytes.length, 18);
|
||||||
msg = new byte[length + 2];
|
msg = new byte[length + 2];
|
||||||
msg[0] = No1F1Constants.CMD_NOTIFICATION;
|
msg[0] = No1F1Constants.CMD_NOTIFICATION;
|
||||||
|
@ -136,10 +136,10 @@ public class GBWebClient extends WebViewClient {
|
|||||||
headers.put("Access-Control-Allow-Origin", "*");
|
headers.put("Access-Control-Allow-Origin", "*");
|
||||||
return new WebResourceResponse("text/html", "utf-8", 200, "OK",
|
return new WebResourceResponse("text/html", "utf-8", 200, "OK",
|
||||||
headers,
|
headers,
|
||||||
new ByteArrayInputStream("1".toString().getBytes())
|
new ByteArrayInputStream("1".getBytes())
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return new WebResourceResponse("text/html", "utf-8", new ByteArrayInputStream("1".toString().getBytes()));
|
return new WebResourceResponse("text/html", "utf-8", new ByteArrayInputStream("1".getBytes()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user