Darryl L Johnson 090b0afb1b Don't report device state until hardware state is known.
The previous implementation of DeviceStateProviderImpl would report the
current device state as soon as a listener was registered leading to a
series of device state changes on boot as the state of the hardware
becomes known. This changes the implementation to await callbacks before
notifying the listener of a change in device state.

Fixes: 181671216
Test: atest DeviceStateProviderImplTest
Test: atest DeviceStateManagerServiceTest
Test: atest DeviceStateManagerGlobalTest

Change-Id: I3f133b6d7135b829b79c9f225ae52c71061faa3e
2021-03-08 18:02:57 -08:00
..