Jakub Pawlowski | 2fc6e6b | 2015-12-29 13:19:21 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.bluetooth; |
| 18 | |
| 19 | import android.os.Parcel; |
| 20 | import android.os.Parcelable; |
| 21 | |
| 22 | import android.util.Log; |
| 23 | |
| 24 | /** |
| 25 | * Out Of Band Data for Bluetooth device. |
Jeff Sharkey | fa6a1bc | 2016-03-01 17:36:23 -0700 | [diff] [blame] | 26 | * @hide |
Jakub Pawlowski | 2fc6e6b | 2015-12-29 13:19:21 -0800 | [diff] [blame] | 27 | */ |
Jeff Sharkey | 9ad443f | 2016-03-01 17:28:36 -0700 | [diff] [blame] | 28 | public class OobData implements Parcelable { |
Jakub Pawlowski | 2fc6e6b | 2015-12-29 13:19:21 -0800 | [diff] [blame] | 29 | private byte[] securityManagerTk; |
| 30 | |
| 31 | public byte[] getSecurityManagerTk() { |
| 32 | return securityManagerTk; |
| 33 | } |
| 34 | |
| 35 | public void setSecurityManagerTk(byte[] securityManagerTk) { |
| 36 | this.securityManagerTk = securityManagerTk; |
| 37 | } |
| 38 | |
| 39 | public OobData() { } |
| 40 | |
| 41 | private OobData(Parcel in) { |
| 42 | securityManagerTk = in.createByteArray(); |
| 43 | } |
| 44 | |
| 45 | public int describeContents() { |
| 46 | return 0; |
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | public void writeToParcel(Parcel out, int flags) { |
| 51 | out.writeByteArray(securityManagerTk); |
| 52 | } |
| 53 | |
| 54 | public static final Parcelable.Creator<OobData> CREATOR |
| 55 | = new Parcelable.Creator<OobData>() { |
| 56 | public OobData createFromParcel(Parcel in) { |
| 57 | return new OobData(in); |
| 58 | } |
| 59 | |
| 60 | public OobData[] newArray(int size) { |
| 61 | return new OobData[size]; |
| 62 | } |
| 63 | }; |
| 64 | } |