Reputation: 3494
After I'm releasing my WakeLock, I want the screen to stay on for the duration of the user's display timeout system setting, which is what I believe the ON_AFTER_RELEASE-flag does. It works fine on my device (GNex, 4.3), but a lot of my users (mainly on 4.3) are reporting that the screen switches off immediately after releasing the WakeLock.
//To acquire the wl:
wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE, TAG);
@Override
public void onPause() {
super.onPause();
if (wl != null) {
if (wl.isHeld()) {
wl.release();
}
}
Am I doing something wrong?
Upvotes: 0
Views: 503
Reputation: 3494
The issue that was causing this behavior was related to something else entirely and had nothing to do with the WakeLock itself.
Upvotes: 1