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

Commit f56a7a29 authored by Natasha Lee's avatar Natasha Lee Committed by Gerrit Code Review
Browse files

Merge "BluetoothCodecType: fix uint64_t cast to java long type" into main

parents 401d171d e7df46c9
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -38,7 +38,11 @@ public final class BluetoothCodecType implements Parcelable {

    private BluetoothCodecType(Parcel in) {
        mNativeCodecType = in.readInt();
        if (Flags.a2dpFixCodecTypeInJava()) {
            mCodecId = in.readLong() & 0xFFFFFFFFL;
        } else {
            mCodecId = in.readLong();
        }
        mCodecName = in.readString();
    }

@@ -68,7 +72,11 @@ public final class BluetoothCodecType implements Parcelable {
     */
    private BluetoothCodecType(@BluetoothCodecConfig.SourceCodecType int codecType, long codecId) {
        mNativeCodecType = codecType;
        if (Flags.a2dpFixCodecTypeInJava()) {
            mCodecId = codecId & 0xFFFFFFFFL;
        } else {
            mCodecId = codecId;
        }
        mCodecName = BluetoothCodecConfig.getCodecName(codecType);
    }

@@ -83,7 +91,11 @@ public final class BluetoothCodecType implements Parcelable {
    @SystemApi
    public BluetoothCodecType(int codecType, long codecId, @NonNull String codecName) {
        mNativeCodecType = codecType;
        if (Flags.a2dpFixCodecTypeInJava()) {
            mCodecId = codecId & 0xFFFFFFFFL;
        } else {
            mCodecId = codecId;
        }
        mCodecName = codecName;
    }