Skip to content

Commit

Permalink
ozone: evdev: Add quirk to force USB 0x18d1:0x5030 as internal
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
mspang committed Oct 16, 2018
1 parent 82c07f1 commit 2220d68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/events/ozone/evdev/event_device_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ bool EventDeviceInfo::Initialize(int fd, const base::FilePath& path) {

device_type_ = GetInputDeviceTypeFromPath(path);

// TODO(spang): Implement these quirks in a better way.
constexpr uint16_t kGoogleVendorId = 0x18d1;
if (vendor_id_ == kGoogleVendorId && product_id_ == 0x5030)
device_type_ = InputDeviceType::INPUT_DEVICE_INTERNAL;

return true;
}

Expand Down

0 comments on commit 2220d68

Please sign in to comment.