Minor cleanup of wakelocks, extension ID backup
(cherry picked from commit b4c7992726)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package exh.util
|
||||
|
||||
import android.app.job.JobScheduler
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.net.wifi.WifiManager
|
||||
|
||||
/**
|
||||
* Property to get the wifi manager from the context.
|
||||
*/
|
||||
val Context.wifiManager: WifiManager
|
||||
get() = applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
|
||||
val Context.clipboardManager: ClipboardManager
|
||||
get() = applicationContext.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
|
||||
val Context.jobScheduler: JobScheduler
|
||||
get() = applicationContext.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler
|
||||
Reference in New Issue
Block a user