Sony Headphones V2: Fix automatic power off out of bounds

This commit is contained in:
José Rebelo 2024-12-30 17:44:06 +00:00
parent bbd0d8709d
commit db10fd66f2

View File

@ -668,7 +668,7 @@ public class SonyProtocolImplV2 extends SonyProtocolImplV1 {
final AutomaticPowerOff mode = AutomaticPowerOff.fromCode(payload[2], payload[3]); final AutomaticPowerOff mode = AutomaticPowerOff.fromCode(payload[2], payload[3]);
if (mode == null) { if (mode == null) {
LOG.warn("Unknown automatic power off codes {}", String.format("%02x %02x", payload[3], payload[4])); LOG.warn("Unknown automatic power off codes {}", String.format("%02x %02x", payload[2], payload[3]));
return Collections.emptyList(); return Collections.emptyList();
} }