Copy smart background from J2k
This commit is contained in:
@@ -3,6 +3,7 @@ package exh.util
|
||||
import android.app.job.JobScheduler
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.res.Configuration
|
||||
import android.net.wifi.WifiManager
|
||||
|
||||
/**
|
||||
@@ -16,3 +17,8 @@ val Context.clipboardManager: ClipboardManager
|
||||
|
||||
val Context.jobScheduler: JobScheduler
|
||||
get() = applicationContext.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler
|
||||
|
||||
fun Context.isInNightMode(): Boolean {
|
||||
val currentNightMode = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
||||
return currentNightMode == Configuration.UI_MODE_NIGHT_YES
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user