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

Commit 85f5798c authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "LeAudio: Fix broadcast code padding"

parents bff94427 582ee08b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1163,10 +1163,8 @@ static void CreateBroadcastNative(JNIEnv* env, jobject object,
      return;
    }

    // Padding with zeros on LSB positions if code is shorter than 16 octets
    env->GetByteArrayRegion(
        broadcast_code, 0, size,
        (jbyte*)code_array.data() + code_array.size() - size);
    // Padding with zeros on MSB positions if code is shorter than 16 octets
    env->GetByteArrayRegion(broadcast_code, 0, size, (jbyte*)code_array.data());
  }

  jbyte* meta = env->GetByteArrayElements(metadata, nullptr);