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

Commit b2543c77 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "BLE OOB Pairing - parse address type (5/5)"

am: 97d9fe0a2f

Change-Id: I935cc35d9f7f1eea5459f0091ad14dc8b200bc02
parents d5e4cfa2 ac1c8d56
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -30,10 +30,24 @@ import android.util.Log;
 * @hide
 * @hide
 */
 */
public class OobData implements Parcelable {
public class OobData implements Parcelable {
    private byte[] leBluetoothDeviceAddress;
    private byte[] securityManagerTk;
    private byte[] securityManagerTk;
    private byte[] leSecureConnectionsConfirmation;
    private byte[] leSecureConnectionsConfirmation;
    private byte[] leSecureConnectionsRandom;
    private byte[] leSecureConnectionsRandom;


    public byte[] getLeBluetoothDeviceAddress() {
        return leBluetoothDeviceAddress;
    }

    /**
     * Sets the LE Bluetooth Device Address value to be used during LE pairing.
     * The value shall be 7 bytes. Please see Bluetooth CSSv6, Part A 1.16 for
     * a detailed description.
     */
    public void setLeBluetoothDeviceAddress(byte[] leBluetoothDeviceAddress) {
        this.leBluetoothDeviceAddress = leBluetoothDeviceAddress;
    }

    public byte[] getSecurityManagerTk() {
    public byte[] getSecurityManagerTk() {
        return securityManagerTk;
        return securityManagerTk;
    }
    }
@@ -66,6 +80,7 @@ public class OobData implements Parcelable {
    public OobData() { }
    public OobData() { }


    private OobData(Parcel in) {
    private OobData(Parcel in) {
        leBluetoothDeviceAddress = in.createByteArray();
        securityManagerTk = in.createByteArray();
        securityManagerTk = in.createByteArray();
        leSecureConnectionsConfirmation = in.createByteArray();
        leSecureConnectionsConfirmation = in.createByteArray();
        leSecureConnectionsRandom = in.createByteArray();
        leSecureConnectionsRandom = in.createByteArray();
@@ -77,6 +92,7 @@ public class OobData implements Parcelable {


    @Override
    @Override
    public void writeToParcel(Parcel out, int flags) {
    public void writeToParcel(Parcel out, int flags) {
        out.writeByteArray(leBluetoothDeviceAddress);
        out.writeByteArray(securityManagerTk);
        out.writeByteArray(securityManagerTk);
        out.writeByteArray(leSecureConnectionsConfirmation);
        out.writeByteArray(leSecureConnectionsConfirmation);
        out.writeByteArray(leSecureConnectionsRandom);
        out.writeByteArray(leSecureConnectionsRandom);