devicelock

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Overview

Package devicelock provides Go bindings for android.devicelock.

Index

Constants

View Source
const (
	DeviceIdTypeImei        = consts.DeviceIdTypeImei
	DeviceIdTypeMeid        = consts.DeviceIdTypeMeid
	DeviceLockRoleFinancing = consts.DeviceLockRoleFinancing
)

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.

Types

type DeviceId

type DeviceId struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

DeviceId wraps android.devicelock.DeviceId.

func (*DeviceId) GetId

func (m *DeviceId) GetId() (string, error)

GetId calls android.devicelock.DeviceId.getId.

func (*DeviceId) GetType

func (m *DeviceId) GetType() (int32, error)

GetType calls android.devicelock.DeviceId.getType.

type DeviceLockManager

type DeviceLockManager struct {
	VM  *jni.VM
	Ctx *app.Context
	Obj *jni.GlobalRef
}

DeviceLockManager wraps android.devicelock.DeviceLockManager.

func NewDeviceLockManager

func NewDeviceLockManager(ctx *app.Context) (*DeviceLockManager, error)

NewDeviceLockManager obtains android.devicelock.DeviceLockManager from the Android system service manager.

func (*DeviceLockManager) Close

func (m *DeviceLockManager) Close()

Close releases the global reference to the underlying Java object. After Close, the DeviceLockManager must not be used.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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