diff options
author | Hansong Zhang <hsz@google.com> | 2017-11-30 16:37:05 -0800 |
---|---|---|
committer | Hansong Zhang <hsz@google.com> | 2017-11-30 16:55:37 -0800 |
commit | 691adeee0c1ca9ab93378520f96d131133b9c863 (patch) | |
tree | ba44fac2fa52c260843e97f61eb8d82af9617019 /framework/java/android/bluetooth/BluetoothHidDevice.java | |
parent | 3950e2f4e42f1a8f16abe6cb499fedaacafa56e9 (diff) |
Bluetooth HID Device: Remove BluetoothHidDeviceAppConfiguration (2/4)
Bug: 69981563
Test: HID Device SL4A Test
Change-Id: Ifb7002bb4f3f6f29b01a3d337ab68b674d6947c9
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHidDevice.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHidDevice.java | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHidDevice.java b/framework/java/android/bluetooth/BluetoothHidDevice.java index 6692e137fa..bfee27974f 100644 --- a/framework/java/android/bluetooth/BluetoothHidDevice.java +++ b/framework/java/android/bluetooth/BluetoothHidDevice.java @@ -136,9 +136,8 @@ public final class BluetoothHidDevice implements BluetoothProfile { } @Override - public void onAppStatusChanged(BluetoothDevice pluggedDevice, - BluetoothHidDeviceAppConfiguration config, boolean registered) { - mCallback.onAppStatusChanged(pluggedDevice, config, registered); + public void onAppStatusChanged(BluetoothDevice pluggedDevice, boolean registered) { + mCallback.onAppStatusChanged(pluggedDevice, registered); } @Override @@ -349,7 +348,7 @@ public final class BluetoothHidDevice implements BluetoothProfile { * Device are only possible when application is registered. Only one * application can be registered at time. When no longer used, application * should be unregistered using - * {@link #unregisterApp(BluetoothHidDeviceAppConfiguration)}. + * {@link #unregisterApp()}. * The registration status should be tracked by the application by handling callback from * BluetoothHidDeviceCallback#onAppStatusChanged. The app registration status is not related * to the return value of this method. @@ -382,11 +381,9 @@ public final class BluetoothHidDevice implements BluetoothProfile { final IBluetoothHidDevice service = mService; if (service != null) { try { - BluetoothHidDeviceAppConfiguration config = - new BluetoothHidDeviceAppConfiguration(); BluetoothHidDeviceCallbackWrapper cbw = new BluetoothHidDeviceCallbackWrapper(callback); - result = service.registerApp(config, sdp, inQos, outQos, cbw); + result = service.registerApp(sdp, inQos, outQos, cbw); } catch (RemoteException e) { Log.e(TAG, e.toString()); } @@ -407,13 +404,9 @@ public final class BluetoothHidDevice implements BluetoothProfile { * BluetoothHidDeviceCallback#onAppStatusChanged. The app registration status is not related * to the return value of this method. * - * @param config {@link BluetoothHidDeviceAppConfiguration} object as obtained from {@link - * BluetoothHidDeviceCallback#onAppStatusChanged(BluetoothDevice, - * BluetoothHidDeviceAppConfiguration, - * boolean)} * @return true if the command is successfully sent; otherwise false. */ - public boolean unregisterApp(BluetoothHidDeviceAppConfiguration config) { + public boolean unregisterApp() { Log.v(TAG, "unregisterApp()"); boolean result = false; @@ -421,7 +414,7 @@ public final class BluetoothHidDevice implements BluetoothProfile { final IBluetoothHidDevice service = mService; if (service != null) { try { - result = service.unregisterApp(config); + result = service.unregisterApp(); } catch (RemoteException e) { Log.e(TAG, e.toString()); } |