summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_kuang.rs <eric_kuang.rs@realtek.com>2022-04-21 14:02:18 +0800
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2022-04-28 08:30:39 +0000
commit8526a3c59353bc0829e2d1a6819599c8a38d3b6a (patch)
tree1301126eb25ef504df928e727c730b2f36b06eea
parentf6990c3f0624de1d517264c11dff4bc75b4eb51b (diff)
downloadTvSettings-8526a3c59353bc0829e2d1a6819599c8a38d3b6a.tar.gz
Add InputDevice.SOURCE_MOUSE and InputDevice.SOURCE_JOYSTICK as valid input accessories.
Bug: 229934129 Test: manual test Change-Id: Ie823b04590b43208ec8244549a2aacfafbcb9231 (cherry picked from commit 0a0dd9076f9463e720cfdad6d40eeac8f0d734d9) (cherry picked from commit a4b5d0700df7a89f43c1e88bf883fca954abe321) Merged-In: Ie823b04590b43208ec8244549a2aacfafbcb9231
-rw-r--r--Settings/src/com/android/tv/settings/accessories/BluetoothDevicePairer.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/Settings/src/com/android/tv/settings/accessories/BluetoothDevicePairer.java b/Settings/src/com/android/tv/settings/accessories/BluetoothDevicePairer.java
index 3d760761c..3b816a77d 100644
--- a/Settings/src/com/android/tv/settings/accessories/BluetoothDevicePairer.java
+++ b/Settings/src/com/android/tv/settings/accessories/BluetoothDevicePairer.java
@@ -188,6 +188,14 @@ public class BluetoothDevicePairer {
isCompatible = true;
}
+ if ((sources & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
+ isCompatible = true;
+ }
+
+ if ((sources & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK) {
+ isCompatible = true;
+ }
+
if ((sources & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
boolean isValidKeyboard = true;
String keyboardName = device.getName();