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