Add APIs to update and listen to deviceId changes in Context
- Adds a updateDeviceId @hide API that can be used by the system
to update the device association of a Context that is not
explicitly created as a Device Context.
- Adds a listener that would be notified whenever the deviceId
of the Context has changed.
- Adds an isDeviceContext() API that can be used to determine
if the device ID returned by getDeviceId() is reliable for
this Context instance.
These APIs will enable implicit deviceId association for Contexts
that are not Device Contexts.
Test: atest DeviceAssociationTest
Bug: 253201821
Change-Id: I8ef7a5f7a82ee341fb98236a01940b4be1e4fb23
6 files changed