enforcepermission

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

Documentation

Index

Constants

View Source
const (
	TransactionINestedProtectedByAccessNetworkState = binder.FirstCallTransaction + 0
	TransactionINestedProtectedByReadSyncSettings   = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodINestedProtectedByAccessNetworkState = "ProtectedByAccessNetworkState"
	MethodINestedProtectedByReadSyncSettings   = "ProtectedByReadSyncSettings"
)
View Source
const (
	TransactionIProtectedProtectedByInternet                                = binder.FirstCallTransaction + 0
	TransactionIProtectedProtectedByVibrate                                 = binder.FirstCallTransaction + 1
	TransactionIProtectedProtectedByInternetAndVibrateImplicitly            = binder.FirstCallTransaction + 2
	TransactionIProtectedProtectedByInternetAndAccessNetworkStateImplicitly = binder.FirstCallTransaction + 3
	TransactionIProtectedProtectedByInternetAndReadSyncSettingsImplicitly   = binder.FirstCallTransaction + 4
	TransactionIProtectedProtectedByTurnScreenOn                            = binder.FirstCallTransaction + 5
	TransactionIProtectedProtectedByReadContacts                            = binder.FirstCallTransaction + 6
	TransactionIProtectedProtectedByReadCalendar                            = binder.FirstCallTransaction + 7
	TransactionIProtectedProtectedByInternetAndVibrate                      = binder.FirstCallTransaction + 8
	TransactionIProtectedProtectedByInternetAndReadSyncSettings             = binder.FirstCallTransaction + 9
	TransactionIProtectedProtectedByAccessWifiStateOrVibrate                = binder.FirstCallTransaction + 10
	TransactionIProtectedProtectedByInternetOrVibrate                       = binder.FirstCallTransaction + 11
	TransactionIProtectedNotProtected                                       = binder.FirstCallTransaction + 12
	TransactionIProtectedManuallyProtected                                  = binder.FirstCallTransaction + 13
)
View Source
const (
	MethodIProtectedProtectedByInternet                                = "ProtectedByInternet"
	MethodIProtectedProtectedByVibrate                                 = "ProtectedByVibrate"
	MethodIProtectedProtectedByInternetAndVibrateImplicitly            = "ProtectedByInternetAndVibrateImplicitly"
	MethodIProtectedProtectedByInternetAndAccessNetworkStateImplicitly = "ProtectedByInternetAndAccessNetworkStateImplicitly"
	MethodIProtectedProtectedByInternetAndReadSyncSettingsImplicitly   = "ProtectedByInternetAndReadSyncSettingsImplicitly"
	MethodIProtectedProtectedByTurnScreenOn                            = "ProtectedByTurnScreenOn"
	MethodIProtectedProtectedByReadContacts                            = "ProtectedByReadContacts"
	MethodIProtectedProtectedByReadCalendar                            = "ProtectedByReadCalendar"
	MethodIProtectedProtectedByInternetAndVibrate                      = "ProtectedByInternetAndVibrate"
	MethodIProtectedProtectedByInternetAndReadSyncSettings             = "ProtectedByInternetAndReadSyncSettings"
	MethodIProtectedProtectedByAccessWifiStateOrVibrate                = "ProtectedByAccessWifiStateOrVibrate"
	MethodIProtectedProtectedByInternetOrVibrate                       = "ProtectedByInternetOrVibrate"
	MethodIProtectedNotProtected                                       = "NotProtected"
	MethodIProtectedManuallyProtected                                  = "ManuallyProtected"
)
View Source
const DescriptorINested = "android.tests.enforcepermission.INested"
View Source
const DescriptorIProtected = "android.tests.enforcepermission.IProtected"

Variables

This section is empty.

Functions

This section is empty.

Types

type INested

type INested interface {
	AsBinder() binder.IBinder
	ProtectedByAccessNetworkState(ctx context.Context) error
	ProtectedByReadSyncSettings(ctx context.Context) error
}

func NewNestedStub

func NewNestedStub(
	impl INestedServer,
) INested

NewNestedStub creates a server-side INested wrapping the given server implementation. The returned value satisfies INested 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 INestedServer

type INestedServer interface {
	ProtectedByAccessNetworkState(ctx context.Context) error
	ProtectedByReadSyncSettings(ctx context.Context) error
}

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

type IProtected

type IProtected interface {
	AsBinder() binder.IBinder
	ProtectedByInternet(ctx context.Context) error
	ProtectedByVibrate(ctx context.Context) error
	ProtectedByInternetAndVibrateImplicitly(ctx context.Context) error
	ProtectedByInternetAndAccessNetworkStateImplicitly(ctx context.Context) error
	ProtectedByInternetAndReadSyncSettingsImplicitly(ctx context.Context) error
	ProtectedByTurnScreenOn(ctx context.Context) error
	ProtectedByReadContacts(ctx context.Context) error
	ProtectedByReadCalendar(ctx context.Context) error
	ProtectedByInternetAndVibrate(ctx context.Context) error
	ProtectedByInternetAndReadSyncSettings(ctx context.Context) error
	ProtectedByAccessWifiStateOrVibrate(ctx context.Context) error
	ProtectedByInternetOrVibrate(ctx context.Context) error
	NotProtected(ctx context.Context) error
	ManuallyProtected(ctx context.Context) error
}

func NewProtectedStub

func NewProtectedStub(
	impl IProtectedServer,
) IProtected

NewProtectedStub creates a server-side IProtected wrapping the given server implementation. The returned value satisfies IProtected 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 IProtectedServer

type IProtectedServer interface {
	ProtectedByInternet(ctx context.Context) error
	ProtectedByVibrate(ctx context.Context) error
	ProtectedByInternetAndVibrateImplicitly(ctx context.Context) error
	ProtectedByInternetAndAccessNetworkStateImplicitly(ctx context.Context) error
	ProtectedByInternetAndReadSyncSettingsImplicitly(ctx context.Context) error
	ProtectedByTurnScreenOn(ctx context.Context) error
	ProtectedByReadContacts(ctx context.Context) error
	ProtectedByReadCalendar(ctx context.Context) error
	ProtectedByInternetAndVibrate(ctx context.Context) error
	ProtectedByInternetAndReadSyncSettings(ctx context.Context) error
	ProtectedByAccessWifiStateOrVibrate(ctx context.Context) error
	ProtectedByInternetOrVibrate(ctx context.Context) error
	NotProtected(ctx context.Context) error
	ManuallyProtected(ctx context.Context) error
}

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

type NestedProxy

type NestedProxy struct {
	Remote binder.IBinder
}

func NewNestedProxy

func NewNestedProxy(
	remote binder.IBinder,
) *NestedProxy

func (*NestedProxy) AsBinder

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

func (*NestedProxy) ProtectedByAccessNetworkState

func (p *NestedProxy) ProtectedByAccessNetworkState(
	ctx context.Context,
) error

func (*NestedProxy) ProtectedByReadSyncSettings

func (p *NestedProxy) ProtectedByReadSyncSettings(
	ctx context.Context,
) error

type NestedStub

type NestedStub struct {
	Impl      INested
	Transport binder.VersionAwareTransport
}

NestedStub dispatches incoming binder transactions to a typed INested implementation.

func (*NestedStub) Descriptor

func (s *NestedStub) Descriptor() string

func (*NestedStub) OnTransaction

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

type ProtectedProxy

type ProtectedProxy struct {
	Remote binder.IBinder
}

func NewProtectedProxy

func NewProtectedProxy(
	remote binder.IBinder,
) *ProtectedProxy

func (*ProtectedProxy) AsBinder

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

func (*ProtectedProxy) ManuallyProtected

func (p *ProtectedProxy) ManuallyProtected(
	ctx context.Context,
) error

func (*ProtectedProxy) NotProtected

func (p *ProtectedProxy) NotProtected(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByAccessWifiStateOrVibrate

func (p *ProtectedProxy) ProtectedByAccessWifiStateOrVibrate(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByInternet

func (p *ProtectedProxy) ProtectedByInternet(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByInternetAndAccessNetworkStateImplicitly

func (p *ProtectedProxy) ProtectedByInternetAndAccessNetworkStateImplicitly(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByInternetAndReadSyncSettings

func (p *ProtectedProxy) ProtectedByInternetAndReadSyncSettings(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByInternetAndReadSyncSettingsImplicitly

func (p *ProtectedProxy) ProtectedByInternetAndReadSyncSettingsImplicitly(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByInternetAndVibrate

func (p *ProtectedProxy) ProtectedByInternetAndVibrate(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByInternetAndVibrateImplicitly

func (p *ProtectedProxy) ProtectedByInternetAndVibrateImplicitly(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByInternetOrVibrate

func (p *ProtectedProxy) ProtectedByInternetOrVibrate(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByReadCalendar

func (p *ProtectedProxy) ProtectedByReadCalendar(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByReadContacts

func (p *ProtectedProxy) ProtectedByReadContacts(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByTurnScreenOn

func (p *ProtectedProxy) ProtectedByTurnScreenOn(
	ctx context.Context,
) error

func (*ProtectedProxy) ProtectedByVibrate

func (p *ProtectedProxy) ProtectedByVibrate(
	ctx context.Context,
) error

type ProtectedStub

type ProtectedStub struct {
	Impl      IProtected
	Transport binder.VersionAwareTransport
}

ProtectedStub dispatches incoming binder transactions to a typed IProtected implementation.

func (*ProtectedStub) Descriptor

func (s *ProtectedStub) Descriptor() string

func (*ProtectedStub) OnTransaction

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