|
@@ -1,6 +1,7 @@
|
|
package eu.kanade.tachiyomi.util.system
|
|
package eu.kanade.tachiyomi.util.system
|
|
|
|
|
|
import android.app.ActivityManager
|
|
import android.app.ActivityManager
|
|
|
|
+import android.app.KeyguardManager
|
|
import android.app.Notification
|
|
import android.app.Notification
|
|
import android.app.NotificationManager
|
|
import android.app.NotificationManager
|
|
import android.content.BroadcastReceiver
|
|
import android.content.BroadcastReceiver
|
|
@@ -153,24 +154,18 @@ val Float.dpToPxEnd: Float
|
|
val Resources.isLTR
|
|
val Resources.isLTR
|
|
get() = configuration.layoutDirection == View.LAYOUT_DIRECTION_LTR
|
|
get() = configuration.layoutDirection == View.LAYOUT_DIRECTION_LTR
|
|
|
|
|
|
-/**
|
|
|
|
- * Property to get the notification manager from the context.
|
|
|
|
- */
|
|
|
|
val Context.notificationManager: NotificationManager
|
|
val Context.notificationManager: NotificationManager
|
|
get() = getSystemService()!!
|
|
get() = getSystemService()!!
|
|
|
|
|
|
-/**
|
|
|
|
- * Property to get the connectivity manager from the context.
|
|
|
|
- */
|
|
|
|
val Context.connectivityManager: ConnectivityManager
|
|
val Context.connectivityManager: ConnectivityManager
|
|
get() = getSystemService()!!
|
|
get() = getSystemService()!!
|
|
|
|
|
|
-/**
|
|
|
|
- * Property to get the power manager from the context.
|
|
|
|
- */
|
|
|
|
val Context.powerManager: PowerManager
|
|
val Context.powerManager: PowerManager
|
|
get() = getSystemService()!!
|
|
get() = getSystemService()!!
|
|
|
|
|
|
|
|
+val Context.keyguardManager: KeyguardManager
|
|
|
|
+ get() = getSystemService()!!
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Convenience method to acquire a partial wake lock.
|
|
* Convenience method to acquire a partial wake lock.
|
|
*/
|
|
*/
|