diff options
| author | Ivan Podogov <ginkage@google.com> | 2016-12-23 11:52:21 +0000 |
|---|---|---|
| committer | Myles Watson <mylesgw@google.com> | 2016-12-29 14:30:40 +0000 |
| commit | 5fabc4426e870bc119027d773efafdf524e5f988 (patch) | |
| tree | 61e593d4bde9e01751142a41cf23d1af5193e1de /framework/java/android/bluetooth/BluetoothAdapter.java | |
| parent | 7d82a61d972018cfa94f983a97283718c34ce4e0 (diff) | |
Rename the Bluetooth profile classes for HID Device role.
We already have BluetoothInputDevice class, so adding something
called BluetoothHidDevice seems confusing. On the other hand,
the new class is designed to connect to HID Host devices, so
naming it BluetoothInputHost makes sense and goes in line with
the existing BluetoothInputDevice.
The same goes for the new constant HID_DEVICE that is just as
confusing to have together with the INPUT_DEVICE one.
This CL also renames the "connection state changed" broadcast
(for the same reasons), declares it as an SDK constant, and also
adds some javadoc to it.
Note that BluetoothHidDeviceApp* classes remained unchanged, as
those correspond to the app that implements the Device (and
connects to the Host).
Test: make
Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
| -rw-r--r-- | framework/java/android/bluetooth/BluetoothAdapter.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index 2b35e2bec4..b483054c99 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -1940,8 +1940,8 @@ public final class BluetoothAdapter { } else if (profile == BluetoothProfile.MAP_CLIENT) { BluetoothMapClient mapClient = new BluetoothMapClient(context, listener); return true; - } else if (profile == BluetoothProfile.HID_DEVICE) { - BluetoothHidDevice hidd = new BluetoothHidDevice(context, listener); + } else if (profile == BluetoothProfile.INPUT_HOST) { + BluetoothInputHost iHost = new BluetoothInputHost(context, listener); return true; } else { return false; @@ -2019,9 +2019,9 @@ public final class BluetoothAdapter { BluetoothMapClient mapClient = (BluetoothMapClient)proxy; mapClient.close(); break; - case BluetoothProfile.HID_DEVICE: - BluetoothHidDevice hidd = (BluetoothHidDevice) proxy; - hidd.close(); + case BluetoothProfile.INPUT_HOST: + BluetoothInputHost iHost = (BluetoothInputHost) proxy; + iHost.close(); break; } } |
