summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Badhri Jagan Sridharan <badhri@google.com> 2021-11-26 22:56:17 -0800
committer Ricky Niu <rickyniu@google.com> 2022-01-21 16:06:04 +0800
commitbdbb2d15beeda11b94d1008061dd071902067b0b (patch)
treef4f90cd4135193caed265b085a2a7cf929120c98 /api/api.go
parentbbfa92e69402894dc0ec3906b33489af53c2eb1a (diff)
Add limitPowerTransfer SystemAPI to UsbPort
limitPowerTransfer when invoked limits the power transfer in and out of the USB port. limitPortTransfer is deactivated either when limitPowerTransfer is deactivated by the caller or when Usb disconnect event is observed by the Usb service. limitPowerTransfer API is asynchronous and the caller gets notified by invoking UsbOperationCallback.onUsbOperationComplete callback to notify the status of the operation. USB_PORT_CHANGED event is broadcasted when port's limitPowerTransfer status changes. UsbPortStatus object is updated to reflect the current status. limitPowerTransfer is protected by android.permission.MANAGE_USB. Bug: 199357330 Bug: 199358576 Test: Tested on Pixel CTS-Coverage-Bug: 215019881 Signed-off-by: Badhri Jagan Sridharan <badhri@google.com> Change-Id: Iabd1187f7527e14ed758abe355ba94a511d8c859
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions