From c80181d30667fba97b80f62346bcd64ae58b4d39 Mon Sep 17 00:00:00 2001 From: Artur Satayev Date: Mon, 4 Nov 2019 19:55:19 +0000 Subject: [PATCH] Add @UnsupportedAppUsage annotations for greylist. go/cleanup-greylist-txt These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code. Bug: 137350495 Test: m Change-Id: I05d8cde83924188f92bcdab3de4386ff1f761e65 --- binder/android/bluetooth/IBluetooth.aidl | 5 +++++ binder/android/bluetooth/IBluetoothA2dp.aidl | 6 ++++++ binder/android/bluetooth/IBluetoothGatt.aidl | 2 ++ binder/android/bluetooth/IBluetoothHeadset.aidl | 6 ++++++ binder/android/bluetooth/IBluetoothManager.aidl | 3 +++ 5 files changed, 22 insertions(+) diff --git a/binder/android/bluetooth/IBluetooth.aidl b/binder/android/bluetooth/IBluetooth.aidl index 6bda14bfc..fa2b063aa 100644 --- a/binder/android/bluetooth/IBluetooth.aidl +++ b/binder/android/bluetooth/IBluetooth.aidl @@ -35,12 +35,14 @@ import android.os.ResultReceiver; */ interface IBluetooth { + @UnsupportedAppUsage boolean isEnabled(); int getState(); boolean enable(); boolean enableNoAutoConnect(); boolean disable(); + @UnsupportedAppUsage String getAddress(); ParcelUuid[] getUuids(); boolean setName(in String name); @@ -79,10 +81,12 @@ interface IBluetooth String getRemoteName(in BluetoothDevice device); int getRemoteType(in BluetoothDevice device); + @UnsupportedAppUsage String getRemoteAlias(in BluetoothDevice device); boolean setRemoteAlias(in BluetoothDevice device, in String name); int getRemoteClass(in BluetoothDevice device); ParcelUuid[] getRemoteUuids(in BluetoothDevice device); + @UnsupportedAppUsage boolean fetchRemoteUuids(in BluetoothDevice device); boolean sdpSearch(in BluetoothDevice device, in ParcelUuid uuid); int getBatteryLevel(in BluetoothDevice device); @@ -102,6 +106,7 @@ interface IBluetooth int getSimAccessPermission(in BluetoothDevice device); boolean setSimAccessPermission(in BluetoothDevice device, int value); + @UnsupportedAppUsage void sendConnectionStateChange(in BluetoothDevice device, int profile, int state, int prevState); void registerCallback(in IBluetoothCallback callback); diff --git a/binder/android/bluetooth/IBluetoothA2dp.aidl b/binder/android/bluetooth/IBluetoothA2dp.aidl index 6606a1b53..9cbd9cabe 100644 --- a/binder/android/bluetooth/IBluetoothA2dp.aidl +++ b/binder/android/bluetooth/IBluetoothA2dp.aidl @@ -27,14 +27,20 @@ import android.bluetooth.BluetoothDevice; */ interface IBluetoothA2dp { // Public API + @UnsupportedAppUsage boolean connect(in BluetoothDevice device); + @UnsupportedAppUsage boolean disconnect(in BluetoothDevice device); + @UnsupportedAppUsage List getConnectedDevices(); + @UnsupportedAppUsage List getDevicesMatchingConnectionStates(in int[] states); + @UnsupportedAppUsage int getConnectionState(in BluetoothDevice device); boolean setActiveDevice(in BluetoothDevice device); BluetoothDevice getActiveDevice(); boolean setPriority(in BluetoothDevice device, int priority); + @UnsupportedAppUsage int getPriority(in BluetoothDevice device); boolean isAvrcpAbsoluteVolumeSupported(); oneway void setAvrcpAbsoluteVolume(int volume); diff --git a/binder/android/bluetooth/IBluetoothGatt.aidl b/binder/android/bluetooth/IBluetoothGatt.aidl index c9e1c4bc8..016eeff95 100644 --- a/binder/android/bluetooth/IBluetoothGatt.aidl +++ b/binder/android/bluetooth/IBluetoothGatt.aidl @@ -71,8 +71,10 @@ interface IBluetoothGatt { void registerSync(in ScanResult scanResult, in int skip, in int timeout, in IPeriodicAdvertisingCallback callback); void unregisterSync(in IPeriodicAdvertisingCallback callback); + @UnsupportedAppUsage void registerClient(in ParcelUuid appId, in IBluetoothGattCallback callback); + @UnsupportedAppUsage void unregisterClient(in int clientIf); void clientConnect(in int clientIf, in String address, in boolean isDirect, in int transport, in boolean opportunistic, in int phy); void clientDisconnect(in int clientIf, in String address); diff --git a/binder/android/bluetooth/IBluetoothHeadset.aidl b/binder/android/bluetooth/IBluetoothHeadset.aidl index 0f6954cd1..c59cab1c3 100644 --- a/binder/android/bluetooth/IBluetoothHeadset.aidl +++ b/binder/android/bluetooth/IBluetoothHeadset.aidl @@ -29,8 +29,10 @@ import android.bluetooth.BluetoothDevice; */ interface IBluetoothHeadset { // Public API + @UnsupportedAppUsage List getConnectedDevices(); List getDevicesMatchingConnectionStates(in int[] states); + @UnsupportedAppUsage int getConnectionState(in BluetoothDevice device); boolean startVoiceRecognition(in BluetoothDevice device); boolean stopVoiceRecognition(in BluetoothDevice device); @@ -40,9 +42,13 @@ interface IBluetoothHeadset { in String arg); // Hidden API + @UnsupportedAppUsage boolean connect(in BluetoothDevice device); + @UnsupportedAppUsage boolean disconnect(in BluetoothDevice device); + @UnsupportedAppUsage boolean setPriority(in BluetoothDevice device, int priority); + @UnsupportedAppUsage int getPriority(in BluetoothDevice device); int getAudioState(in BluetoothDevice device); boolean isAudioOn(); diff --git a/binder/android/bluetooth/IBluetoothManager.aidl b/binder/android/bluetooth/IBluetoothManager.aidl index 2e1270048..faf78d828 100644 --- a/binder/android/bluetooth/IBluetoothManager.aidl +++ b/binder/android/bluetooth/IBluetoothManager.aidl @@ -31,13 +31,16 @@ interface IBluetoothManager { IBluetooth registerAdapter(in IBluetoothManagerCallback callback); void unregisterAdapter(in IBluetoothManagerCallback callback); + @UnsupportedAppUsage void registerStateChangeCallback(in IBluetoothStateChangeCallback callback); + @UnsupportedAppUsage void unregisterStateChangeCallback(in IBluetoothStateChangeCallback callback); boolean isEnabled(); boolean enable(String packageName); boolean enableNoAutoConnect(String packageName); boolean disable(String packageName, boolean persist); int getState(); + @UnsupportedAppUsage IBluetoothGatt getBluetoothGatt(); boolean bindBluetoothProfileService(int profile, IBluetoothProfileServiceConnection proxy); -- 2.11.0