Skip to content

Commit 4f2d11a

Browse files
authored
android: Fix rename packet using wrong opcode (0x1E → 0x1A) (#511)
1 parent 1f2d707 commit 4f2d11a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • android/app/src/main/java/me/kavishdevar/librepods/utils

android/app/src/main/java/me/kavishdevar/librepods/utils/AACPManager.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class AACPManager {
4343
const val EAR_DETECTION: Byte = 0x06
4444
const val CONVERSATION_AWARENESS: Byte = 0x4B
4545
const val INFORMATION: Byte = 0x1D
46-
const val RENAME: Byte = 0x1E
46+
const val RENAME: Byte = 0x1A
4747
const val HEADTRACKING: Byte = 0x17
4848
const val PROXIMITY_KEYS_REQ: Byte = 0x30
4949
const val PROXIMITY_KEYS_RSP: Byte = 0x31
@@ -773,9 +773,10 @@ class AACPManager {
773773
val packet = ByteArray(5 + size)
774774
packet[0] = Opcodes.RENAME
775775
packet[1] = 0x00
776-
packet[2] = size.toByte()
777-
packet[3] = 0x00
778-
System.arraycopy(nameBytes, 0, packet, 4, size)
776+
packet[2] = 0x01
777+
packet[3] = size.toByte()
778+
packet[4] = 0x00
779+
System.arraycopy(nameBytes, 0, packet, 5, size)
779780

780781
return packet
781782
}

0 commit comments

Comments
 (0)