toggle menu
KAHelpers
androidJvm
switch theme
search in API
kotlinextensions
/
dev.funkymuse.kotlinextensions.power
Package-level
declarations
Types
Functions
Properties
Types
Doze
State
Link copied to clipboard
enum
DozeState
:
Enum
<
DozeState
>
Properties
is
Device
Idle
Link copied to clipboard
val
Context
.
isDeviceIdle
:
Boolean
?
is
Ignoring
Battery
Optimization
Link copied to clipboard
val
Context
.
isIgnoringBatteryOptimization
:
Boolean
?
is
In
Interactive
State
Link copied to clipboard
val
Context
.
isInInteractiveState
:
Boolean
?
is
In
Power
Save
Mode
Link copied to clipboard
val
Context
.
isInPowerSaveMode
:
Boolean
?
is
Sustained
Performance
Mode
Supported
Link copied to clipboard
@get:
RequiresApi
(
value
=
24
)
val
Context
.
isSustainedPerformanceModeSupported
:
Boolean
?
location
Power
Save
Mode
Link copied to clipboard
@get:
RequiresApi
(
value
=
28
)
val
Context
.
locationPowerSaveMode
:
Int
?
thermal
Status
Link copied to clipboard
@get:
RequiresApi
(
value
=
29
)
val
Context
.
thermalStatus
:
Int
?
Functions
create
New
Wake
Lock
Link copied to clipboard
fun
Context
.
createNewWakeLock
(
levelFlags
:
Int
,
tag
:
String
)
:
PowerManager.WakeLock
?
Creates new wakelock Creates a new wake lock with the specified level and flags.
get
Doze
State
Link copied to clipboard
fun
Context
.
getDozeState
(
)
:
DozeState
is
Wake
Lock
Level
Supported
Link copied to clipboard
fun
Context
.
isWakeLockLevelSupported
(
level
:
Int
)
:
Boolean
?
permission
Granted
Link copied to clipboard
fun
Context
.
permissionGranted
(
permission
:
String
)
:
Boolean