TachiyomiSY-Plus/app/src/main/java/exh/util/ContextExtensions.kt
arkon 005d43a3ec Minor cleanup of wakelocks, extension ID backup
(cherry picked from commit b4c7992726fdf36a7dc58e7d7142c2a1642d0f36)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt
2020-05-09 11:30:38 -04:00

19 lines
624 B
Kotlin

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