Reduce battery usage - Unregister callbacks onStop

This commit is contained in:
Mygod
2015-12-26 23:46:18 +08:00
parent 0018a7ca9e
commit 4d7bf8d707
3 changed files with 31 additions and 15 deletions
@@ -218,6 +218,15 @@ class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListe
}
}
override def onStart() {
super.onStart()
registerCallback
}
override def onStop() {
super.onStop()
unregisterCallback
}
override def onDestroy {
deattachService()
super.onDestroy