diff options
| author | 2022-01-19 18:49:52 -0800 | |
|---|---|---|
| committer | 2022-01-28 11:58:55 -0800 | |
| commit | a714924707a5ca36f2053003826d55de069549c4 (patch) | |
| tree | 3fcbed70826270fef0456b77647fbc8365b89bc9 /api/api.go | |
| parent | a9f0101e33400d58fa7d6e27f22d739cf3864796 (diff) | |
Add WakeLock.setStateListener() API.
WakeLock uses this API to add listener of type WakelockStateListener,
whenever framework enable/disable this wake lock, the onStateChanged()
callback on this listener is called.
This API can be called before or afte acquiring the wakelock. It can be
called multiple times to change to another listener.
Add test cases testNotifyWakeLockCallback() and
testNotifyWakeLockCallbackChange() in PowerManagerServiceTest.java.
Bug: 213925462
Test: atest cts/tests/tests/os/src/android/os/cts/PowerManager_WakeLockTest.java.
Change-Id: Ic59303c59e53eb974e2765e3036002ac97ce8aa5
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions