advancedprotection

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: 5 Imported by: 0

Documentation

Overview

Package advancedprotection provides Go bindings for android.security.advancedprotection.

Index

Constants

This section is empty.

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 AdvancedProtectionManager

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

AdvancedProtectionManager wraps android.security.advancedprotection.AdvancedProtectionManager.

func NewAdvancedProtectionManager

func NewAdvancedProtectionManager(ctx *app.Context) (*AdvancedProtectionManager, error)

NewAdvancedProtectionManager obtains android.security.advancedprotection.AdvancedProtectionManager from the Android system service manager.

func (*AdvancedProtectionManager) Close

func (m *AdvancedProtectionManager) Close()

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

func (*AdvancedProtectionManager) IsAdvancedProtectionEnabled

func (m *AdvancedProtectionManager) IsAdvancedProtectionEnabled() (bool, error)

IsAdvancedProtectionEnabled calls android.security.advancedprotection.AdvancedProtectionManager.isAdvancedProtectionEnabled.

func (*AdvancedProtectionManager) RegisterAdvancedProtectionCallback

func (m *AdvancedProtectionManager) RegisterAdvancedProtectionCallback(arg0 *jni.Object, arg1 *jni.Object) error

RegisterAdvancedProtectionCallback calls android.security.advancedprotection.AdvancedProtectionManager.registerAdvancedProtectionCallback.

func (*AdvancedProtectionManager) UnregisterAdvancedProtectionCallback

func (m *AdvancedProtectionManager) UnregisterAdvancedProtectionCallback(arg0 *jni.Object) error

UnregisterAdvancedProtectionCallback calls android.security.advancedprotection.AdvancedProtectionManager.unregisterAdvancedProtectionCallback.

type AdvancedProtectionManagerCallback

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

AdvancedProtectionManagerCallback wraps android.security.advancedprotection.AdvancedProtectionManager$Callback.

func (*AdvancedProtectionManagerCallback) OnAdvancedProtectionChanged

func (m *AdvancedProtectionManagerCallback) OnAdvancedProtectionChanged(arg0 bool) error

OnAdvancedProtectionChanged calls android.security.advancedprotection.AdvancedProtectionManager$Callback.onAdvancedProtectionChanged.

Jump to

Keyboard shortcuts

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