Android: How to release resources when the application terminates?

前端 未结 5 1386
独厮守ぢ
独厮守ぢ 2020-12-18 22:13

I created an application which uses camera and during the appplication execution the screen is always on.

In the onCreate() method I added the lock:

         


        
5条回答
  •  醉梦人生
    2020-12-18 22:41

    I use mWakelock.setReferenceCounted(false), still dunno what it means, but it resolves my "Wakelock under-locked" problem.

    Init: OnStart() acquire: onResume() release: onStop()

提交回复
热议问题