Commit Graph

2 Commits

Author SHA1 Message Date
Alex Salo
b4a617767b Add disableSelf() and more failure codes
disableSelf() allows the implementer of the service to notify the system
about the intent to disable self, e.g. in case it does not have sufficient
permissions to perform the task.

New failure codes are introduced to communicate the absense of the
camera permission and a cancellation event.

Bug: 128921381, 111939367
Test: manually
Change-Id: Id9a2a8e8d51d422e966a5858c85f8a73ca37ded7
2019-03-21 14:43:51 -07:00
Alex Salo
b81472f7e2 Add skeleton implementation for Attention API
This service will let the system know whether the user is paying attention to
the device. This may be useful in certain scenarios - like keeping the screen
on, even when there has been no touch related user activity.

New permission BIND_ATTENTION_SERVICE is added to ensure that only the system
can bind to the attention service.

Test: manually tested the lifecycle is as expected
Bug: 111939367
Change-Id: I2dab9c69f3d0c6efb0db572f797f517dc6efcc72
2019-01-16 21:21:51 -08:00