whlk
whlk

Reputation: 15635

drop wakelock in WakefulBroadcastReceiver that does not start a Service

I registered a WakefulBroadcastReceiver that gets called at some time and based on the content of the broadcast decides to start a service to process the intent or not.

My question is: Is there a wakelock registered even if the startWakefulService is not called? If so, how do I release the wakelock again?

Upvotes: 1

Views: 419

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006819

Is there a wakelock registered even if the startWakefulService is not called?

No, there is not, as you can tell by looking at the WakefulBroadcastReceiver source code.

Upvotes: 2

Related Questions