1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 02:06:21 +02:00

Sony WH-1000XM4: Attempt to fix handling of speak to cheat enabled

This commit is contained in:
José Rebelo 2023-03-24 00:37:15 +00:00
parent f2a7f6ab45
commit 2ec68dbef4

View File

@ -770,6 +770,12 @@ public class SonyProtocolImplV1 extends AbstractSonyProtocolImpl {
return Collections.emptyList();
}
if (payload[1] != 0x01) {
// TODO: Handle these, setting speak to chat sends a 0x02 back
LOG.warn("Not speak to chat enabled, ignoring");
return Collections.emptyList();
}
final Boolean enabled = booleanFromByte(payload[3]);
if (enabled == null) {
LOG.warn("Unknown speak to chat code {}", String.format("%02x", payload[3]));