Misc Service cleanup (#9005)
* Simplify DownloadService wake lock handling _isRunning is only modified in onCreate/onDestroy, so the listener job is redundant. * Drop superclass calls to Service.onCreate/onDestroy From https://developer.android.com/guide/components/services > Note: Unlike the activity lifecycle callback methods, you are not > required to call the superclass implementation of these callback > methods.
This commit is contained in:
@@ -177,8 +177,6 @@ class LibraryUpdateService(
|
||||
* the wake lock.
|
||||
*/
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
notifier = LibraryUpdateNotifier(this)
|
||||
wakeLock = acquireWakeLock(javaClass.name)
|
||||
|
||||
@@ -198,7 +196,6 @@ class LibraryUpdateService(
|
||||
if (instance == this) {
|
||||
instance = null
|
||||
}
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user