2 * Copyright (C) 2008, The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package android.bluetooth;
19 import android.bluetooth.IBluetoothCallback;
20 import android.bluetooth.IBluetoothStateChangeCallback;
21 import android.bluetooth.BluetoothActivityEnergyInfo;
22 import android.bluetooth.BluetoothDevice;
23 import android.os.ParcelUuid;
24 import android.os.ParcelFileDescriptor;
27 * System private API for talking with the Bluetooth service.
36 boolean enableNoAutoConnect();
40 ParcelUuid[] getUuids();
41 boolean setName(in String name);
45 boolean setScanMode(int mode, int duration);
47 int getDiscoverableTimeout();
48 boolean setDiscoverableTimeout(int timeout);
50 boolean startDiscovery();
51 boolean cancelDiscovery();
52 boolean isDiscovering();
54 int getAdapterConnectionState();
55 int getProfileConnectionState(int profile);
57 BluetoothDevice[] getBondedDevices();
58 boolean createBond(in BluetoothDevice device, in int transport);
59 boolean cancelBondProcess(in BluetoothDevice device);
60 boolean removeBond(in BluetoothDevice device);
61 int getBondState(in BluetoothDevice device);
62 boolean isConnected(in BluetoothDevice device);
64 String getRemoteName(in BluetoothDevice device);
65 int getRemoteType(in BluetoothDevice device);
66 String getRemoteAlias(in BluetoothDevice device);
67 boolean setRemoteAlias(in BluetoothDevice device, in String name);
68 int getRemoteClass(in BluetoothDevice device);
69 ParcelUuid[] getRemoteUuids(in BluetoothDevice device);
70 boolean fetchRemoteUuids(in BluetoothDevice device);
71 boolean fetchRemoteMasInstances(in BluetoothDevice device);
73 boolean setPin(in BluetoothDevice device, boolean accept, int len, in byte[] pinCode);
74 boolean setPasskey(in BluetoothDevice device, boolean accept, int len, in byte[]
76 boolean setPairingConfirmation(in BluetoothDevice device, boolean accept);
78 int getPhonebookAccessPermission(in BluetoothDevice device);
79 boolean setPhonebookAccessPermission(in BluetoothDevice device, int value);
80 int getMessageAccessPermission(in BluetoothDevice device);
81 boolean setMessageAccessPermission(in BluetoothDevice device, int value);
83 void sendConnectionStateChange(in BluetoothDevice device, int profile, int state, int prevState);
85 void registerCallback(in IBluetoothCallback callback);
86 void unregisterCallback(in IBluetoothCallback callback);
89 ParcelFileDescriptor connectSocket(in BluetoothDevice device, int type, in ParcelUuid uuid, int port, int flag);
90 ParcelFileDescriptor createSocketChannel(int type, in String serviceName, in ParcelUuid uuid, int port, int flag);
92 boolean configHciSnoopLog(boolean enable);
94 boolean isMultiAdvertisementSupported();
95 boolean isOffloadedFilteringSupported();
96 boolean isOffloadedScanBatchingSupported();
97 boolean isActivityAndEnergyReportingSupported();
98 void getActivityEnergyInfoFromController();
99 BluetoothActivityEnergyInfo reportActivityInfo();