Skip to content

Commit 2220d68

Browse files
committed
ozone: evdev: Add quirk to force USB 0x18d1:0x5030 as internal
This adds a quirk to force this device as internal so that it behaves correctly in tablet mode. Bug: b/116723180 Test: please Change-Id: Ica3ace1098daf090e843ffb03bb27ef07d5144a1 Reviewed-on: https://chromium-review.googlesource.com/c/1280845 Reviewed-by: Kevin Schoedel <[email protected]> Reviewed-by: Xiaoqian Dai <[email protected]> Commit-Queue: Michael Spang <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#599732}(cherry picked from commit 1d6ccd8) Reviewed-on: https://chromium-review.googlesource.com/c/1283944 Reviewed-by: Michael Spang <[email protected]> Cr-Commit-Position: refs/branch-heads/3578@{#53} Cr-Branched-From: 4226ddf-refs/heads/master@{#599034}
1 parent 82c07f1 commit 2220d68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/events/ozone/evdev/event_device_info.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ bool EventDeviceInfo::Initialize(int fd, const base::FilePath& path) {
197197

198198
device_type_ = GetInputDeviceTypeFromPath(path);
199199

200+
// TODO(spang): Implement these quirks in a better way.
201+
constexpr uint16_t kGoogleVendorId = 0x18d1;
202+
if (vendor_id_ == kGoogleVendorId && product_id_ == 0x5030)
203+
device_type_ = InputDeviceType::INPUT_DEVICE_INTERNAL;
204+
200205
return true;
201206
}
202207

0 commit comments

Comments
 (0)