Search code examples
androidandroid-wake-lockbackgrounding

Does creating new android wakelock with tag return same wakelock every time?


Title can be enigmatic. My question is simple i create wakelock:

pwrMgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "wakelock1")

Then i do this again in another place, with same tag, do i get same wakelock with acquiration references?


Solution

  • No, you do not. I wish that you did, as it would have simplified some scenarios. As the documentation indicates, it is solely for debugging purposes.