oemlock

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

Documentation

Index

Constants

View Source
const (
	TransactionIOemLockGetName                      = binder.FirstCallTransaction + 0
	TransactionIOemLockIsOemUnlockAllowedByCarrier  = binder.FirstCallTransaction + 1
	TransactionIOemLockIsOemUnlockAllowedByDevice   = binder.FirstCallTransaction + 2
	TransactionIOemLockSetOemUnlockAllowedByCarrier = binder.FirstCallTransaction + 3
	TransactionIOemLockSetOemUnlockAllowedByDevice  = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIOemLockGetName                      = "getName"
	MethodIOemLockIsOemUnlockAllowedByCarrier  = "isOemUnlockAllowedByCarrier"
	MethodIOemLockIsOemUnlockAllowedByDevice   = "isOemUnlockAllowedByDevice"
	MethodIOemLockSetOemUnlockAllowedByCarrier = "setOemUnlockAllowedByCarrier"
	MethodIOemLockSetOemUnlockAllowedByDevice  = "setOemUnlockAllowedByDevice"
)
View Source
const DescriptorIOemLock = "android.hardware.oemlock.IOemLock"

Variables

This section is empty.

Functions

This section is empty.

Types

type IOemLock

type IOemLock interface {
	AsBinder() binder.IBinder
	GetName(ctx context.Context) (string, error)
	IsOemUnlockAllowedByCarrier(ctx context.Context) (bool, error)
	IsOemUnlockAllowedByDevice(ctx context.Context) (bool, error)
	SetOemUnlockAllowedByCarrier(ctx context.Context, allowed bool, signature []byte) (OemLockSecureStatus, error)
	SetOemUnlockAllowedByDevice(ctx context.Context, allowed bool) error
}

func NewOemLockStub

func NewOemLockStub(
	impl IOemLockServer,
) IOemLock

NewOemLockStub creates a server-side IOemLock wrapping the given server implementation. The returned value satisfies IOemLock 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 IOemLockServer

type IOemLockServer interface {
	GetName(ctx context.Context) (string, error)
	IsOemUnlockAllowedByCarrier(ctx context.Context) (bool, error)
	IsOemUnlockAllowedByDevice(ctx context.Context) (bool, error)
	SetOemUnlockAllowedByCarrier(ctx context.Context, allowed bool, signature []byte) (OemLockSecureStatus, error)
	SetOemUnlockAllowedByDevice(ctx context.Context, allowed bool) error
}

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

type OemLockProxy

type OemLockProxy struct {
	Remote binder.IBinder
}

func NewOemLockProxy

func NewOemLockProxy(
	remote binder.IBinder,
) *OemLockProxy

func (*OemLockProxy) AsBinder

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

func (*OemLockProxy) GetName

func (p *OemLockProxy) GetName(
	ctx context.Context,
) (string, error)

func (*OemLockProxy) IsOemUnlockAllowedByCarrier

func (p *OemLockProxy) IsOemUnlockAllowedByCarrier(
	ctx context.Context,
) (bool, error)

func (*OemLockProxy) IsOemUnlockAllowedByDevice

func (p *OemLockProxy) IsOemUnlockAllowedByDevice(
	ctx context.Context,
) (bool, error)

func (*OemLockProxy) SetOemUnlockAllowedByCarrier

func (p *OemLockProxy) SetOemUnlockAllowedByCarrier(
	ctx context.Context,
	allowed bool,
	signature []byte,
) (OemLockSecureStatus, error)

func (*OemLockProxy) SetOemUnlockAllowedByDevice

func (p *OemLockProxy) SetOemUnlockAllowedByDevice(
	ctx context.Context,
	allowed bool,
) error

type OemLockSecureStatus

type OemLockSecureStatus int32
const (
	OemLockSecureStatusOK               OemLockSecureStatus = 0
	OemLockSecureStatusFAILED           OemLockSecureStatus = 1
	OemLockSecureStatusInvalidSignature OemLockSecureStatus = 2
)

type OemLockStub

type OemLockStub struct {
	Impl      IOemLock
	Transport binder.VersionAwareTransport
}

OemLockStub dispatches incoming binder transactions to a typed IOemLock implementation.

func (*OemLockStub) Descriptor

func (s *OemLockStub) Descriptor() string

func (*OemLockStub) OnTransaction

func (s *OemLockStub) 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