power

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Overview

Package power provides Go bindings for .

Index

Constants

View Source
const (
	AcquireCausesWakeup                                = consts.AcquireCausesWakeup
	FullWakeLock                                       = consts.FullWakeLock
	LocationModeAllDisabledWhenScreenOff               = consts.LocationModeAllDisabledWhenScreenOff
	LocationModeForegroundOnly                         = consts.LocationModeForegroundOnly
	LocationModeGpsDisabledWhenScreenOff               = consts.LocationModeGpsDisabledWhenScreenOff
	LocationModeNoChange                               = consts.LocationModeNoChange
	LocationModeThrottleRequestsWhenScreenOff          = consts.LocationModeThrottleRequestsWhenScreenOff
	LowPowerStandbyAllowedReasonOngoingCall            = consts.LowPowerStandbyAllowedReasonOngoingCall
	LowPowerStandbyAllowedReasonTempPowerSaveAllowlist = consts.LowPowerStandbyAllowedReasonTempPowerSaveAllowlist
	LowPowerStandbyAllowedReasonVoiceInteraction       = consts.LowPowerStandbyAllowedReasonVoiceInteraction
	OnAfterRelease                                     = consts.OnAfterRelease
	PartialWakeLock                                    = consts.PartialWakeLock
	ProximityScreenOffWakeLock                         = consts.ProximityScreenOffWakeLock
	ReleaseFlagWaitForNoProximity                      = consts.ReleaseFlagWaitForNoProximity
	ScreenBrightWakeLock                               = consts.ScreenBrightWakeLock
	ScreenDimWakeLock                                  = consts.ScreenDimWakeLock
	ThermalStatusCritical                              = consts.ThermalStatusCritical
	ThermalStatusEmergency                             = consts.ThermalStatusEmergency
	ThermalStatusLight                                 = consts.ThermalStatusLight
	ThermalStatusModerate                              = consts.ThermalStatusModerate
	ThermalStatusNone                                  = consts.ThermalStatusNone
	ThermalStatusSevere                                = consts.ThermalStatusSevere
	ThermalStatusShutdown                              = consts.ThermalStatusShutdown
)
View Source
const (
	ActionDeviceIdleModeChanged         = consts.ActionDeviceIdleModeChanged
	ActionDeviceLightIdleModeChanged    = consts.ActionDeviceLightIdleModeChanged
	ActionLowPowerStandbyEnabledChanged = consts.ActionLowPowerStandbyEnabledChanged
	ActionLowPowerStandbyPolicyChanged  = consts.ActionLowPowerStandbyPolicyChanged
	ActionPowerSaveModeChanged          = consts.ActionPowerSaveModeChanged
	FeatureWakeOnLanInLowPowerStandby   = consts.FeatureWakeOnLanInLowPowerStandby
)

Variables

This section is empty.

Functions

func Init

func Init(env *jni.Env) error

Init resolves all JNI class and method references for this package. It is safe to call multiple times (uses sync.Once internally). Exported for E2E testing on Android.

func NewpowerManager

func NewpowerManager(ctx *app.Context) (*powerManager, error)

NewpowerManager obtains android.os.PowerManager from the Android system service manager.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL