Siarhei Vishniakou 5cafb24b91 Process output events in a separate function
Currently, we are processing input events and output events inside
'handleEvent' looper callback. That function is quite large, and will
get more complex when we add another outgoing event type.

To simplify the code, move the outbound event processing into a separate
function. At the same time, slightly modify the logic to make it clear
that the goal of the loop is to send all of the outgoing events.

Bug: 169866723
Test: presubmit
Change-Id: I47b4b82087428a9a6d4c50caf985a8699de3cb86
2021-03-03 21:45:54 +00:00
..
2021-02-22 08:40:39 -08:00