Aurimas Liutikas | 93554f2 | 2022-04-19 16:51:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 | |
| 18 | package android.bluetooth; |
| 19 | |
| 20 | import android.os.Parcel; |
| 21 | import android.os.Parcelable; |
| 22 | |
| 23 | /** |
| 24 | * The Bluetooth Health Application Configuration that is used in conjunction with |
| 25 | * the {@link BluetoothHealth} class. This class represents an application configuration |
| 26 | * that the Bluetooth Health third party application will register to communicate with the |
| 27 | * remote Bluetooth health device. |
| 28 | * |
| 29 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 30 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 31 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 32 | * {@link BluetoothDevice#createL2capChannel(int)} |
| 33 | */ |
| 34 | @Deprecated |
| 35 | public final class BluetoothHealthAppConfiguration implements Parcelable { |
| 36 | |
| 37 | /** |
| 38 | * Hide auto-created default constructor |
| 39 | * @hide |
| 40 | */ |
| 41 | BluetoothHealthAppConfiguration() {} |
| 42 | |
| 43 | @Override |
| 44 | public int describeContents() { |
| 45 | return 0; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Return the data type associated with this application configuration. |
| 50 | * |
| 51 | * @return dataType |
| 52 | * |
| 53 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 54 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 55 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 56 | * {@link BluetoothDevice#createL2capChannel(int)} |
| 57 | */ |
| 58 | @Deprecated |
| 59 | public int getDataType() { |
| 60 | return 0; |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Return the name of the application configuration. |
| 65 | * |
| 66 | * @return String name |
| 67 | * |
| 68 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 69 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 70 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 71 | * {@link BluetoothDevice#createL2capChannel(int)} |
| 72 | */ |
| 73 | @Deprecated |
| 74 | public String getName() { |
| 75 | return null; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Return the role associated with this application configuration. |
| 80 | * |
| 81 | * @return One of {@link BluetoothHealth#SOURCE_ROLE} or {@link BluetoothHealth#SINK_ROLE} |
| 82 | * |
| 83 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 84 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 85 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 86 | * {@link BluetoothDevice#createL2capChannel(int)} |
| 87 | */ |
| 88 | @Deprecated |
| 89 | public int getRole() { |
| 90 | return 0; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 95 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 96 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 97 | * {@link BluetoothDevice#createL2capChannel(int)} |
| 98 | */ |
| 99 | @Deprecated |
| 100 | public static final @android.annotation.NonNull Parcelable.Creator<BluetoothHealthAppConfiguration> CREATOR = |
| 101 | new Parcelable.Creator<BluetoothHealthAppConfiguration>() { |
| 102 | @Override |
| 103 | public BluetoothHealthAppConfiguration createFromParcel(Parcel in) { |
| 104 | return new BluetoothHealthAppConfiguration(); |
| 105 | } |
| 106 | |
| 107 | @Override |
| 108 | public BluetoothHealthAppConfiguration[] newArray(int size) { |
| 109 | return new BluetoothHealthAppConfiguration[size]; |
| 110 | } |
| 111 | }; |
| 112 | |
| 113 | @Override |
| 114 | public void writeToParcel(Parcel out, int flags) {} |
| 115 | } |