[Bluetooth] Restrict running HID detection logic at OOBE.
crrev.com/c/1758837 intended to restrict OOBE HID detection logic to only run on devices that it should (e.g., Chromeboxes), but overlooked the instantiation of HidDetectionScreen, which once created, goes ahead and tries to connect to all HID devices even when the actual screen is not shown. This CL corrects that oversight and only creates HidDetectionScreen when it is known to be needed. This CL also adds a WizardController::HasScreen() method to facilitate testing. Using WizardController::GetScreen() to test the absence of the HIDDetectionScreen does not work because it triggers a DCHECK in SCreenManager [1]. 1) https://cs.chromium.org/chromium/src/chrome/browser/chromeos/login/screen_manager.cc?l=25 Bug: 1007500, 1024479 Change-Id: I362a05bad73a2876d4b3a937b99823a90fa3e3a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915080 Commit-Queue: Ryan Hansberry <hansberry@chromium.org> Reviewed-by:James Cook <jamescook@chromium.org> Cr-Commit-Position: refs/heads/master@{#715490}
Showing
Please register or sign in to comment