trust

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TransactionITrustAgentServiceOnUnlockAttempt        = binder.FirstCallTransaction + 0
	TransactionITrustAgentServiceOnUserRequestedUnlock  = binder.FirstCallTransaction + 1
	TransactionITrustAgentServiceOnUserMayRequestUnlock = binder.FirstCallTransaction + 2
	TransactionITrustAgentServiceOnUnlockLockout        = binder.FirstCallTransaction + 3
	TransactionITrustAgentServiceOnTrustTimeout         = binder.FirstCallTransaction + 4
	TransactionITrustAgentServiceOnDeviceLocked         = binder.FirstCallTransaction + 5
	TransactionITrustAgentServiceOnDeviceUnlocked       = binder.FirstCallTransaction + 6
	TransactionITrustAgentServiceOnConfigure            = binder.FirstCallTransaction + 7
	TransactionITrustAgentServiceSetCallback            = binder.FirstCallTransaction + 8
	TransactionITrustAgentServiceOnEscrowTokenAdded     = binder.FirstCallTransaction + 9
	TransactionITrustAgentServiceOnTokenStateReceived   = binder.FirstCallTransaction + 10
	TransactionITrustAgentServiceOnEscrowTokenRemoved   = binder.FirstCallTransaction + 11
)
View Source
const (
	MethodITrustAgentServiceOnUnlockAttempt        = "onUnlockAttempt"
	MethodITrustAgentServiceOnUserRequestedUnlock  = "onUserRequestedUnlock"
	MethodITrustAgentServiceOnUserMayRequestUnlock = "onUserMayRequestUnlock"
	MethodITrustAgentServiceOnUnlockLockout        = "onUnlockLockout"
	MethodITrustAgentServiceOnTrustTimeout         = "onTrustTimeout"
	MethodITrustAgentServiceOnDeviceLocked         = "onDeviceLocked"
	MethodITrustAgentServiceOnDeviceUnlocked       = "onDeviceUnlocked"
	MethodITrustAgentServiceOnConfigure            = "onConfigure"
	MethodITrustAgentServiceSetCallback            = "setCallback"
	MethodITrustAgentServiceOnEscrowTokenAdded     = "onEscrowTokenAdded"
	MethodITrustAgentServiceOnTokenStateReceived   = "onTokenStateReceived"
	MethodITrustAgentServiceOnEscrowTokenRemoved   = "onEscrowTokenRemoved"
)
View Source
const (
	TransactionITrustAgentServiceCallbackGrantTrust               = binder.FirstCallTransaction + 0
	TransactionITrustAgentServiceCallbackRevokeTrust              = binder.FirstCallTransaction + 1
	TransactionITrustAgentServiceCallbackLockUser                 = binder.FirstCallTransaction + 2
	TransactionITrustAgentServiceCallbackSetManagingTrust         = binder.FirstCallTransaction + 3
	TransactionITrustAgentServiceCallbackOnConfigureCompleted     = binder.FirstCallTransaction + 4
	TransactionITrustAgentServiceCallbackAddEscrowToken           = binder.FirstCallTransaction + 5
	TransactionITrustAgentServiceCallbackIsEscrowTokenActive      = binder.FirstCallTransaction + 6
	TransactionITrustAgentServiceCallbackRemoveEscrowToken        = binder.FirstCallTransaction + 7
	TransactionITrustAgentServiceCallbackUnlockUserWithToken      = binder.FirstCallTransaction + 8
	TransactionITrustAgentServiceCallbackShowKeyguardErrorMessage = binder.FirstCallTransaction + 9
)
View Source
const (
	MethodITrustAgentServiceCallbackGrantTrust               = "grantTrust"
	MethodITrustAgentServiceCallbackRevokeTrust              = "revokeTrust"
	MethodITrustAgentServiceCallbackLockUser                 = "lockUser"
	MethodITrustAgentServiceCallbackSetManagingTrust         = "setManagingTrust"
	MethodITrustAgentServiceCallbackOnConfigureCompleted     = "onConfigureCompleted"
	MethodITrustAgentServiceCallbackAddEscrowToken           = "addEscrowToken"
	MethodITrustAgentServiceCallbackIsEscrowTokenActive      = "isEscrowTokenActive"
	MethodITrustAgentServiceCallbackRemoveEscrowToken        = "removeEscrowToken"
	MethodITrustAgentServiceCallbackUnlockUserWithToken      = "unlockUserWithToken"
	MethodITrustAgentServiceCallbackShowKeyguardErrorMessage = "showKeyguardErrorMessage"
)
View Source
const DescriptorITrustAgentService = "android.service.trust.ITrustAgentService"
View Source
const DescriptorITrustAgentServiceCallback = "android.service.trust.ITrustAgentServiceCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type GrantTrustResult

type GrantTrustResult struct {
	Status int32
}

func (*GrantTrustResult) MarshalParcel

func (s *GrantTrustResult) MarshalParcel(
	p *parcel.Parcel,
) error

func (*GrantTrustResult) UnmarshalParcel

func (s *GrantTrustResult) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ITrustAgentService

type ITrustAgentService interface {
	AsBinder() binder.IBinder
	OnUnlockAttempt(ctx context.Context, successful bool) error
	OnUserRequestedUnlock(ctx context.Context, dismissKeyguard bool) error
	OnUserMayRequestUnlock(ctx context.Context) error
	OnUnlockLockout(ctx context.Context, timeoutMs int32) error
	OnTrustTimeout(ctx context.Context) error
	OnDeviceLocked(ctx context.Context) error
	OnDeviceUnlocked(ctx context.Context) error
	OnConfigure(ctx context.Context, options []os.PersistableBundle, token binder.IBinder) error
	SetCallback(ctx context.Context, callback ITrustAgentServiceCallback) error
	OnEscrowTokenAdded(ctx context.Context, token []byte, handle int64, user os.UserHandle) error
	OnTokenStateReceived(ctx context.Context, handle int64, tokenState int32) error
	OnEscrowTokenRemoved(ctx context.Context, handle int64, successful bool) error
}

func NewTrustAgentServiceStub

func NewTrustAgentServiceStub(
	impl ITrustAgentServiceServer,
) ITrustAgentService

NewTrustAgentServiceStub creates a server-side ITrustAgentService wrapping the given server implementation. The returned value satisfies ITrustAgentService and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ITrustAgentServiceCallback

type ITrustAgentServiceCallback interface {
	AsBinder() binder.IBinder
	GrantTrust(ctx context.Context, message string, durationMs int64, flags int32, resultCallback infra.AndroidFuture) error
	RevokeTrust(ctx context.Context) error
	LockUser(ctx context.Context) error
	SetManagingTrust(ctx context.Context, managingTrust bool) error
	OnConfigureCompleted(ctx context.Context, result bool, token binder.IBinder) error
	AddEscrowToken(ctx context.Context, token []byte) error
	IsEscrowTokenActive(ctx context.Context, handle int64) error
	RemoveEscrowToken(ctx context.Context, handle int64) error
	UnlockUserWithToken(ctx context.Context, handle int64, token []byte) error
	ShowKeyguardErrorMessage(ctx context.Context, message string) error
}

func NewTrustAgentServiceCallbackStub

func NewTrustAgentServiceCallbackStub(
	impl ITrustAgentServiceCallbackServer,
) ITrustAgentServiceCallback

NewTrustAgentServiceCallbackStub creates a server-side ITrustAgentServiceCallback wrapping the given server implementation. The returned value satisfies ITrustAgentServiceCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ITrustAgentServiceCallbackServer

type ITrustAgentServiceCallbackServer interface {
	GrantTrust(ctx context.Context, message string, durationMs int64, flags int32, resultCallback infra.AndroidFuture) error
	RevokeTrust(ctx context.Context) error
	LockUser(ctx context.Context) error
	SetManagingTrust(ctx context.Context, managingTrust bool) error
	OnConfigureCompleted(ctx context.Context, result bool, token binder.IBinder) error
	AddEscrowToken(ctx context.Context, token []byte) error
	IsEscrowTokenActive(ctx context.Context, handle int64) error
	RemoveEscrowToken(ctx context.Context, handle int64) error
	UnlockUserWithToken(ctx context.Context, handle int64, token []byte) error
	ShowKeyguardErrorMessage(ctx context.Context, message string) error
}

ITrustAgentServiceCallbackServer is the server-side interface that user implementations provide to NewTrustAgentServiceCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ITrustAgentServiceServer

type ITrustAgentServiceServer interface {
	OnUnlockAttempt(ctx context.Context, successful bool) error
	OnUserRequestedUnlock(ctx context.Context, dismissKeyguard bool) error
	OnUserMayRequestUnlock(ctx context.Context) error
	OnUnlockLockout(ctx context.Context, timeoutMs int32) error
	OnTrustTimeout(ctx context.Context) error
	OnDeviceLocked(ctx context.Context) error
	OnDeviceUnlocked(ctx context.Context) error
	OnConfigure(ctx context.Context, options []os.PersistableBundle, token binder.IBinder) error
	SetCallback(ctx context.Context, callback ITrustAgentServiceCallback) error
	OnEscrowTokenAdded(ctx context.Context, token []byte, handle int64, user os.UserHandle) error
	OnTokenStateReceived(ctx context.Context, handle int64, tokenState int32) error
	OnEscrowTokenRemoved(ctx context.Context, handle int64, successful bool) error
}

ITrustAgentServiceServer is the server-side interface that user implementations provide to NewTrustAgentServiceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type TrustAgentServiceCallbackProxy

type TrustAgentServiceCallbackProxy struct {
	Remote binder.IBinder
}

func NewTrustAgentServiceCallbackProxy

func NewTrustAgentServiceCallbackProxy(
	remote binder.IBinder,
) *TrustAgentServiceCallbackProxy

func (*TrustAgentServiceCallbackProxy) AddEscrowToken

func (p *TrustAgentServiceCallbackProxy) AddEscrowToken(
	ctx context.Context,
	token []byte,
) error

func (*TrustAgentServiceCallbackProxy) AsBinder

func (*TrustAgentServiceCallbackProxy) GrantTrust

func (p *TrustAgentServiceCallbackProxy) GrantTrust(
	ctx context.Context,
	message string,
	durationMs int64,
	flags int32,
	resultCallback infra.AndroidFuture,
) error

func (*TrustAgentServiceCallbackProxy) IsEscrowTokenActive

func (p *TrustAgentServiceCallbackProxy) IsEscrowTokenActive(
	ctx context.Context,
	handle int64,
) error

func (*TrustAgentServiceCallbackProxy) LockUser

func (*TrustAgentServiceCallbackProxy) OnConfigureCompleted

func (p *TrustAgentServiceCallbackProxy) OnConfigureCompleted(
	ctx context.Context,
	result bool,
	token binder.IBinder,
) error

func (*TrustAgentServiceCallbackProxy) RemoveEscrowToken

func (p *TrustAgentServiceCallbackProxy) RemoveEscrowToken(
	ctx context.Context,
	handle int64,
) error

func (*TrustAgentServiceCallbackProxy) RevokeTrust

func (p *TrustAgentServiceCallbackProxy) RevokeTrust(
	ctx context.Context,
) error

func (*TrustAgentServiceCallbackProxy) SetManagingTrust

func (p *TrustAgentServiceCallbackProxy) SetManagingTrust(
	ctx context.Context,
	managingTrust bool,
) error

func (*TrustAgentServiceCallbackProxy) ShowKeyguardErrorMessage

func (p *TrustAgentServiceCallbackProxy) ShowKeyguardErrorMessage(
	ctx context.Context,
	message string,
) error

func (*TrustAgentServiceCallbackProxy) UnlockUserWithToken

func (p *TrustAgentServiceCallbackProxy) UnlockUserWithToken(
	ctx context.Context,
	handle int64,
	token []byte,
) error

type TrustAgentServiceCallbackStub

type TrustAgentServiceCallbackStub struct {
	Impl      ITrustAgentServiceCallback
	Transport binder.VersionAwareTransport
}

TrustAgentServiceCallbackStub dispatches incoming binder transactions to a typed ITrustAgentServiceCallback implementation.

func (*TrustAgentServiceCallbackStub) Descriptor

func (s *TrustAgentServiceCallbackStub) Descriptor() string

func (*TrustAgentServiceCallbackStub) OnTransaction

type TrustAgentServiceProxy

type TrustAgentServiceProxy struct {
	Remote binder.IBinder
}

func NewTrustAgentServiceProxy

func NewTrustAgentServiceProxy(
	remote binder.IBinder,
) *TrustAgentServiceProxy

func (*TrustAgentServiceProxy) AsBinder

func (p *TrustAgentServiceProxy) AsBinder() binder.IBinder

func (*TrustAgentServiceProxy) OnConfigure

func (p *TrustAgentServiceProxy) OnConfigure(
	ctx context.Context,
	options []os.PersistableBundle,
	token binder.IBinder,
) error

func (*TrustAgentServiceProxy) OnDeviceLocked

func (p *TrustAgentServiceProxy) OnDeviceLocked(
	ctx context.Context,
) error

func (*TrustAgentServiceProxy) OnDeviceUnlocked

func (p *TrustAgentServiceProxy) OnDeviceUnlocked(
	ctx context.Context,
) error

func (*TrustAgentServiceProxy) OnEscrowTokenAdded

func (p *TrustAgentServiceProxy) OnEscrowTokenAdded(
	ctx context.Context,
	token []byte,
	handle int64,
	user os.UserHandle,
) error

func (*TrustAgentServiceProxy) OnEscrowTokenRemoved

func (p *TrustAgentServiceProxy) OnEscrowTokenRemoved(
	ctx context.Context,
	handle int64,
	successful bool,
) error

func (*TrustAgentServiceProxy) OnTokenStateReceived

func (p *TrustAgentServiceProxy) OnTokenStateReceived(
	ctx context.Context,
	handle int64,
	tokenState int32,
) error

func (*TrustAgentServiceProxy) OnTrustTimeout

func (p *TrustAgentServiceProxy) OnTrustTimeout(
	ctx context.Context,
) error

func (*TrustAgentServiceProxy) OnUnlockAttempt

func (p *TrustAgentServiceProxy) OnUnlockAttempt(
	ctx context.Context,
	successful bool,
) error

func (*TrustAgentServiceProxy) OnUnlockLockout

func (p *TrustAgentServiceProxy) OnUnlockLockout(
	ctx context.Context,
	timeoutMs int32,
) error

func (*TrustAgentServiceProxy) OnUserMayRequestUnlock

func (p *TrustAgentServiceProxy) OnUserMayRequestUnlock(
	ctx context.Context,
) error

func (*TrustAgentServiceProxy) OnUserRequestedUnlock

func (p *TrustAgentServiceProxy) OnUserRequestedUnlock(
	ctx context.Context,
	dismissKeyguard bool,
) error

func (*TrustAgentServiceProxy) SetCallback

func (p *TrustAgentServiceProxy) SetCallback(
	ctx context.Context,
	callback ITrustAgentServiceCallback,
) error

type TrustAgentServiceStub

type TrustAgentServiceStub struct {
	Impl      ITrustAgentService
	Transport binder.VersionAwareTransport
}

TrustAgentServiceStub dispatches incoming binder transactions to a typed ITrustAgentService implementation.

func (*TrustAgentServiceStub) Descriptor

func (s *TrustAgentServiceStub) Descriptor() string

func (*TrustAgentServiceStub) OnTransaction

func (s *TrustAgentServiceStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

Jump to

Keyboard shortcuts

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