Merge "Fix flaky DeviceEvent test" into main