diff options
| author | 2011-01-12 10:08:57 -0800 | |
|---|---|---|
| committer | 2011-01-12 10:08:57 -0800 | |
| commit | ac6f13dc68dadb59fcad1df4af478bf0955e6e87 (patch) | |
| tree | 5c2e74fbb417e991bbd1d3e38211bf64945dad4c | |
| parent | fde7f0ede4248c7fe4c066bfc449381fde530430 (diff) | |
Revert "Add temporary hack for keyboards not following spec."
This reverts commit 8cc316e4f4458725f78b2b7ebde2f780f9b8447b.
| -rw-r--r-- | core/java/android/server/BluetoothEventLoop.java | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java index ae729d2d586f..ebe7d32361b2 100644 --- a/core/java/android/server/BluetoothEventLoop.java +++ b/core/java/android/server/BluetoothEventLoop.java @@ -548,26 +548,15 @@ class BluetoothEventLoop { } } - // STOPSHIP: Hack for MOT keyboards - boolean motKeyboard = false; - String name = mBluetoothService.getRemoteName(address); - if (name == null && address.startsWith("00:0F:F6") || - (name != null && name.startsWith("Motorola"))) { - motKeyboard = true; - } - - if (!motKeyboard) { - if (btDeviceClass == BluetoothClass.Device.PERIPHERAL_KEYBOARD || - btDeviceClass == BluetoothClass.Device.PERIPHERAL_KEYBOARD_POINTING) { - // Its a keyboard. Follow the HID spec recommendation of creating the - // passkey and displaying it to the user. - // Generate a variable PIN. This is not truly random but good enough. - int pin = (int) Math.floor(Math.random() * 10000); - sendDisplayPinIntent(address, pin); - return; - } + if (btDeviceClass == BluetoothClass.Device.PERIPHERAL_KEYBOARD || + btDeviceClass == BluetoothClass.Device.PERIPHERAL_KEYBOARD_POINTING) { + // Its a keyboard. Follow the HID spec recommendation of creating the + // passkey and displaying it to the user. + // Generate a variable PIN. This is not truly random but good enough. + int pin = (int) Math.floor(Math.random() * 10000); + sendDisplayPinIntent(address, pin); + return; } - // Acquire wakelock during PIN code request to bring up LCD display mWakeLock.acquire(); Intent intent = new Intent(BluetoothDevice.ACTION_PAIRING_REQUEST); |