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

Skip to content
Commit e7df46c9 authored by Jakub Rotkiewicz's avatar Jakub Rotkiewicz
Browse files

BluetoothCodecType: fix uint64_t cast to java long type

Wrong definition of codecs:
public static final long CODEC_ID_SBC = 0x0000000000;
instead of:
public static final long CODEC_ID_SBC = 0x0000000000L;
caused index mismatch in BT settings.

Java treats such values without 'L' as 32bit integers and in the native
code codec ids are represented as uint64_t - so to store the proper
value we need to end definitions with L.

This CL proposes temporary solution until the API changes will be
possible. Since all currently used codec indexes fit in 32bit we can
mask out the proper value.

CL can be manually tested: change codec LDAC -> SBC -> LDAC

Bug: 359095333
Bug: 361554713
Flag: com.android.bluetooth.flags.a2dp_fix_codec_type_in_java
Test: mmm packages/modules/Bluetooth

Change-Id: I2267a2075691f002707431d253fe854c18b65517
parent 19e17d9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment