EventHub: Re-open Devices serially when AssociatedDevice changes
This CL changes behavior so that when an AssociatedDevice changes, all affected Devices will be re-opened serially, where the DEVICE_REMOVED notification of one device closing is followed by the DEVICE_ADDED signal of its new counterpart, before proceeding with the re-opening of the next affected Device. This is to temorarily curb the side-effects of delayed AssociatedDevice changes by reducing the number of cases where we send device removed notifications immediately after an input device is first connected, followed by the addition of a new InputDevice. These kind of "hotplug" events are detrimental to many tests and may have side effects in production. This CL relies on some assumptions on how devices will be merged in InputReader, so it does not solve the problem for all cases. It only aims to reduce the likelihood of impact temporarily until AssociatedDevice changes can be processed separately in InputReader, which is backlogged as b/281822656. Bug: 397208968 Test: Presubmit Flag: EXEMPT bug fix Change-Id: I61818076a720a5474de8cbeb431ddbceec6e1545
Loading
Please register or sign in to comment