Documentation
¶
Index ¶
- Constants
- type INested
- type INestedServer
- type IProtected
- type IProtectedServer
- type NestedProxy
- type NestedStub
- type ProtectedProxy
- func (p *ProtectedProxy) AsBinder() binder.IBinder
- func (p *ProtectedProxy) ManuallyProtected(ctx context.Context) error
- func (p *ProtectedProxy) NotProtected(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByAccessWifiStateOrVibrate(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByInternet(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByInternetAndAccessNetworkStateImplicitly(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByInternetAndReadSyncSettings(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByInternetAndReadSyncSettingsImplicitly(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByInternetAndVibrate(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByInternetAndVibrateImplicitly(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByInternetOrVibrate(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByReadCalendar(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByReadContacts(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByTurnScreenOn(ctx context.Context) error
- func (p *ProtectedProxy) ProtectedByVibrate(ctx context.Context) error
- type ProtectedStub
Constants ¶
const ( TransactionINestedProtectedByAccessNetworkState = binder.FirstCallTransaction + 0 TransactionINestedProtectedByReadSyncSettings = binder.FirstCallTransaction + 1 )
const ( MethodINestedProtectedByAccessNetworkState = "ProtectedByAccessNetworkState" MethodINestedProtectedByReadSyncSettings = "ProtectedByReadSyncSettings" )
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 )
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" )
const DescriptorINested = "android.tests.enforcepermission.INested"
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 ¶
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 ¶
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)