Posts DeviceStateManager notifications to a handler

Instead of showing the DeviceStateManager notifications synchronously
while holding a lock, we post them to a handler.
This should resolve any deadlock contentions that occur when
showing a notification permission dialog, while holding the
DeviceStateManagerService lock.

Bug: 292444664
Test: DeviceStateNotificationControllerTest
Change-Id: I498d494852a04027ac0b47a9e179003f04c028ca
2 files changed