Add onDeviceStateChanged() callback to DeviceStateManager.

This change introduces the DeviceStateCallback API to DeviceStateManager
which allows processes outside system_server (as well as system_server)
to receive notifications about changes in the system's device state.

Test: atest DeviceStateManagerServiceTest
Bug: 159401801

Change-Id: I9ccdbd8c4a51858a13b0152ed39a8bf20e41e64f
10 files changed