blob: f9a2245819538ae9114b304650a0047496e22b18 [file] [log] [blame]
Hemant Guptae88fd4b2014-04-18 11:22:45 +05301/*
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 java.util.Random;
23
24/** @hide */
25public final class BluetoothHidDeviceAppSdpSettings implements Parcelable {
26
27 final public String name;
28 final public String description;
29 final public String provider;
30 final public byte subclass;
31 final public byte[] descriptors;
32
33 public BluetoothHidDeviceAppSdpSettings(String name, String description, String provider,
34 byte subclass, byte[] descriptors) {
35 this.name = name;
36 this.description = description;
37 this.provider = provider;
38 this.subclass = subclass;
39 this.descriptors = descriptors.clone();
40 }
41
42 @Override
43 public boolean equals(Object o) {
44 if (o instanceof BluetoothHidDeviceAppSdpSettings) {
45 BluetoothHidDeviceAppSdpSettings sdp = (BluetoothHidDeviceAppSdpSettings) o;
46 return false;
47 }
48 return false;
49 }
50
51 @Override
52 public int describeContents() {
53 return 0;
54 }
55
56 public static final Parcelable.Creator<BluetoothHidDeviceAppSdpSettings> CREATOR =
57 new Parcelable.Creator<BluetoothHidDeviceAppSdpSettings>() {
58
59 @Override
60 public BluetoothHidDeviceAppSdpSettings createFromParcel(Parcel in) {
61
62 return new BluetoothHidDeviceAppSdpSettings(in.readString(), in.readString(),
63 in.readString(), in.readByte(), in.createByteArray());
64 }
65
66 @Override
67 public BluetoothHidDeviceAppSdpSettings[] newArray(int size) {
68 return new BluetoothHidDeviceAppSdpSettings[size];
69 }
70 };
71
72 @Override
73 public void writeToParcel(Parcel out, int flags) {
74 out.writeString(name);
75 out.writeString(description);
76 out.writeString(provider);
77 out.writeByte(subclass);
78 out.writeByteArray(descriptors);
79 }
80}