tablet mode: only respond to input events after its initial setup is done.
Logs show that device can enter tablet mode during startup because of no
internal and external input device available and then quickly exit
tablet mode after input device setup is finished. We should only monitor
input devices change and respond to it after the initial input device
setup is finished.
Bug: 1050195
Change-Id: If8e35ec51472e93379ef2030cab3efb02f089c63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2181567
Commit-Queue: Xiaoqian Dai <[email protected]>
Reviewed-by: Ahmed Fakhry <[email protected]>
Cr-Commit-Position: refs/heads/master@{#765805}
diff --git a/ash/shell_test_api.cc b/ash/shell_test_api.cc
index 907c532..5b405a53 100644
--- a/ash/shell_test_api.cc
+++ b/ash/shell_test_api.cc
@@ -163,6 +163,7 @@
// to prevent the callback from evdev thread from overwriting whatever we set
// here below. See `InputDeviceFactoryEvdevProxy::OnStartupScanComplete()`.
base::RunLoop().RunUntilIdle();
+ ui::DeviceDataManagerTestApi().OnDeviceListsComplete();
ui::DeviceDataManagerTestApi().SetMouseDevices({});
TabletMode::Waiter waiter(enable);