Add SystemApis annotations
There are some number of places where bluetooth APIs are used via reflection from GMSCore. Add proper annotations. Bug: 67052734 Test: Manual - and using make update-api Change-Id: Ib6e3aa1ff5b6f9cdc78367f9be13ed00542d6f65
This commit is contained in:
@@ -7708,6 +7708,7 @@ package android.bluetooth {
|
||||
method public boolean disableBLE();
|
||||
method public boolean enable();
|
||||
method public boolean enableBLE();
|
||||
method public boolean enableNoAutoConnect();
|
||||
method public java.lang.String getAddress();
|
||||
method public android.bluetooth.le.BluetoothLeAdvertiser getBluetoothLeAdvertiser();
|
||||
method public android.bluetooth.le.BluetoothLeScanner getBluetoothLeScanner();
|
||||
@@ -8097,6 +8098,7 @@ package android.bluetooth {
|
||||
}
|
||||
|
||||
public final class BluetoothDevice implements android.os.Parcelable {
|
||||
method public boolean cancelBondProcess();
|
||||
method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback);
|
||||
method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int);
|
||||
method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int);
|
||||
@@ -8114,7 +8116,9 @@ package android.bluetooth {
|
||||
method public android.os.ParcelUuid[] getUuids();
|
||||
method public boolean isConnected();
|
||||
method public boolean isEncrypted();
|
||||
method public boolean removeBond();
|
||||
method public boolean setPairingConfirmation(boolean);
|
||||
method public boolean setPhonebookAccessPermission(int);
|
||||
method public boolean setPin(byte[]);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final java.lang.String ACTION_ACL_CONNECTED = "android.bluetooth.device.action.ACL_CONNECTED";
|
||||
@@ -8345,11 +8349,14 @@ package android.bluetooth {
|
||||
}
|
||||
|
||||
public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile {
|
||||
method public boolean connect(android.bluetooth.BluetoothDevice);
|
||||
method public boolean disconnect(android.bluetooth.BluetoothDevice);
|
||||
method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
|
||||
method public int getConnectionState(android.bluetooth.BluetoothDevice);
|
||||
method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
|
||||
method public boolean isAudioConnected(android.bluetooth.BluetoothDevice);
|
||||
method public boolean sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice, java.lang.String, java.lang.String);
|
||||
method public boolean setPriority(android.bluetooth.BluetoothDevice, int);
|
||||
method public boolean startVoiceRecognition(android.bluetooth.BluetoothDevice);
|
||||
method public boolean stopVoiceRecognition(android.bluetooth.BluetoothDevice);
|
||||
field public static final java.lang.String ACTION_AUDIO_STATE_CHANGED = "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED";
|
||||
|
||||
@@ -2277,6 +2277,8 @@ public final class BluetoothAdapter {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
|
||||
public boolean enableNoAutoConnect() {
|
||||
if (isEnabled()) {
|
||||
if (DBG) Log.d(TAG, "enableNoAutoConnect(): BT already enabled!");
|
||||
|
||||
@@ -1098,6 +1098,8 @@ public final class BluetoothDevice implements Parcelable {
|
||||
* @return true on success, false on error
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
|
||||
public boolean cancelBondProcess() {
|
||||
final IBluetooth service = sService;
|
||||
if (service == null) {
|
||||
@@ -1125,6 +1127,8 @@ public final class BluetoothDevice implements Parcelable {
|
||||
* @return true on success, false on error
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
|
||||
public boolean removeBond() {
|
||||
final IBluetooth service = sService;
|
||||
if (service == null) {
|
||||
@@ -1174,6 +1178,7 @@ public final class BluetoothDevice implements Parcelable {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH)
|
||||
public boolean isConnected() {
|
||||
final IBluetooth service = sService;
|
||||
if (service == null) {
|
||||
@@ -1197,6 +1202,7 @@ public final class BluetoothDevice implements Parcelable {
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH)
|
||||
public boolean isEncrypted() {
|
||||
final IBluetooth service = sService;
|
||||
if (service == null) {
|
||||
@@ -1444,6 +1450,8 @@ public final class BluetoothDevice implements Parcelable {
|
||||
* @return Whether the value has been successfully set.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED)
|
||||
public boolean setPhonebookAccessPermission(int value) {
|
||||
final IBluetooth service = sService;
|
||||
if (service == null) {
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
|
||||
package android.bluetooth;
|
||||
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SdkConstant;
|
||||
import android.annotation.SdkConstant.SdkConstantType;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.os.Binder;
|
||||
@@ -416,6 +418,8 @@ public final class BluetoothHeadset implements BluetoothProfile {
|
||||
* @return false on immediate error, true otherwise
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
|
||||
public boolean connect(BluetoothDevice device) {
|
||||
if (DBG) log("connect(" + device + ")");
|
||||
final IBluetoothHeadset service = mService;
|
||||
@@ -456,6 +460,8 @@ public final class BluetoothHeadset implements BluetoothProfile {
|
||||
* @return false on immediate error, true otherwise
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
|
||||
public boolean disconnect(BluetoothDevice device) {
|
||||
if (DBG) log("disconnect(" + device + ")");
|
||||
final IBluetoothHeadset service = mService;
|
||||
@@ -543,6 +549,8 @@ public final class BluetoothHeadset implements BluetoothProfile {
|
||||
* @return true if priority is set, false on error
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN)
|
||||
public boolean setPriority(BluetoothDevice device, int priority) {
|
||||
if (DBG) log("setPriority(" + device + ", " + priority + ")");
|
||||
final IBluetoothHeadset service = mService;
|
||||
|
||||
Reference in New Issue
Block a user