blob: 01f72efb22ac4479d388a8c8c0433864b9559877 [file] [log] [blame]
Jakub Pawlowski2fc6e6b2015-12-29 13:19:21 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.bluetooth;
18
19import android.os.Parcel;
20import android.os.Parcelable;
21
22import android.util.Log;
23
24/**
25 * Out Of Band Data for Bluetooth device.
26 */
27public class OobData implements Parcelable {
28 private byte[] securityManagerTk;
29
30 public byte[] getSecurityManagerTk() {
31 return securityManagerTk;
32 }
33
34 public void setSecurityManagerTk(byte[] securityManagerTk) {
35 this.securityManagerTk = securityManagerTk;
36 }
37
38 public OobData() { }
39
40 private OobData(Parcel in) {
41 securityManagerTk = in.createByteArray();
42 }
43
44 public int describeContents() {
45 return 0;
46 }
47
48 @Override
49 public void writeToParcel(Parcel out, int flags) {
50 out.writeByteArray(securityManagerTk);
51 }
52
53 public static final Parcelable.Creator<OobData> CREATOR
54 = new Parcelable.Creator<OobData>() {
55 public OobData createFromParcel(Parcel in) {
56 return new OobData(in);
57 }
58
59 public OobData[] newArray(int size) {
60 return new OobData[size];
61 }
62 };
63}