This probably has nothing to do with the WakeLock
. Your activity is probably being called with onStop()
when the screen turns off.
Audio players usually use a service for the audio playback, so the playback can run independently of UI concerns like this.