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
Loading
Please register or sign in to comment