Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 928dde80 authored by Evan Chen's avatar Evan Chen
Browse files

Introduce APIs to support CDM data sync

- Adds a new `requestAction()` API. This method binds the target
  companion app's service to ensure it can perform background work, and
  then dispatches the action request.
- Implements `setOnDevicePresenceEventListener` and a corresponding
  broadcast mechanism. This allows other system services to listen for
  detailed `DevicePresenceEvent`s from companion apps.
- Implements 'setOnActionResultListener' to allow system to get
  callback when apps notify ActionResult to CDM.
- Add a new `notifyActionResult`to allow apps to notify result to
  CDM
- Deprecated notifydeviceAppeared/notifyDeviceDisappeared system APIs,
  introudced a new system API called notifyDevicePresence to replace
  the deprecated one.
- Added ActionRequest
- Added ActionResult
- Added new events in DevicePresenceEvent.

This provides the foundation for the data sync feature, allowing the
system to safely manage the companion app's lifecycle while it performs
requested background tasks.

Test: CTS
Bug: 422195296
Flag: android.companion.enable_data_sync
Change-Id: I60390c65e6e5704e4807d4aa016da71df0c3e273
parent f1ebbcd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment