I read PowerManager API Doc which said "In addition, you can add two more flags, which affect behavior of the screen only. These flags have no effect when combined with a PARTIAL_WAKE_LOCK."
So ON_AFTER_RELEASE
and ACQUIRE_CAUSES_WAKEUP
not work with PARTIAL_WAKE_LOCK
.
But why in google alarm module here , they used them together:
sCpuWakeLock = pm.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK |
PowerManager.ACQUIRE_CAUSES_WAKEUP |
PowerManager.ON_AFTER_RELEASE, Log.LOGTAG);