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
Loading
Please register or sign in to comment