Skip to content
Commit a7149247 authored by Hui Yu's avatar Hui Yu
Browse files

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
parent a9f0101e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment