Documentation
¶
Index ¶
- Constants
- type AppHibernationServiceProxy
- func (p *AppHibernationServiceProxy) AsBinder() binder.IBinder
- func (p *AppHibernationServiceProxy) GetHibernatingPackagesForUser(ctx context.Context) ([]string, error)
- func (p *AppHibernationServiceProxy) GetHibernationStatsForUser(ctx context.Context, packageNames []string) (map[string]HibernationStats, error)
- func (p *AppHibernationServiceProxy) IsHibernatingForUser(ctx context.Context, packageName string) (bool, error)
- func (p *AppHibernationServiceProxy) IsHibernatingGlobally(ctx context.Context, packageName string) (bool, error)
- func (p *AppHibernationServiceProxy) IsOatArtifactDeletionEnabled(ctx context.Context) (bool, error)
- func (p *AppHibernationServiceProxy) SetHibernatingForUser(ctx context.Context, packageName string, isHibernating bool) error
- func (p *AppHibernationServiceProxy) SetHibernatingGlobally(ctx context.Context, packageName string, isHibernating bool) error
- type AppHibernationServiceStub
- type HibernationStats
- type IAppHibernationService
- type IAppHibernationServiceServer
Constants ¶
View Source
const ( TransactionIAppHibernationServiceIsHibernatingForUser = binder.FirstCallTransaction + 0 TransactionIAppHibernationServiceSetHibernatingForUser = binder.FirstCallTransaction + 1 TransactionIAppHibernationServiceIsHibernatingGlobally = binder.FirstCallTransaction + 2 TransactionIAppHibernationServiceSetHibernatingGlobally = binder.FirstCallTransaction + 3 TransactionIAppHibernationServiceGetHibernatingPackagesForUser = binder.FirstCallTransaction + 4 TransactionIAppHibernationServiceGetHibernationStatsForUser = binder.FirstCallTransaction + 5 TransactionIAppHibernationServiceIsOatArtifactDeletionEnabled = binder.FirstCallTransaction + 6 )
View Source
const ( MethodIAppHibernationServiceIsHibernatingForUser = "isHibernatingForUser" MethodIAppHibernationServiceSetHibernatingForUser = "setHibernatingForUser" MethodIAppHibernationServiceIsHibernatingGlobally = "isHibernatingGlobally" MethodIAppHibernationServiceSetHibernatingGlobally = "setHibernatingGlobally" MethodIAppHibernationServiceGetHibernatingPackagesForUser = "getHibernatingPackagesForUser" MethodIAppHibernationServiceGetHibernationStatsForUser = "getHibernationStatsForUser" MethodIAppHibernationServiceIsOatArtifactDeletionEnabled = "isOatArtifactDeletionEnabled" )
View Source
const DescriptorIAppHibernationService = "android.apphibernation.IAppHibernationService"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppHibernationServiceProxy ¶
func NewAppHibernationServiceProxy ¶
func NewAppHibernationServiceProxy( remote binder.IBinder, ) *AppHibernationServiceProxy
func (*AppHibernationServiceProxy) AsBinder ¶
func (p *AppHibernationServiceProxy) AsBinder() binder.IBinder
func (*AppHibernationServiceProxy) GetHibernatingPackagesForUser ¶
func (p *AppHibernationServiceProxy) GetHibernatingPackagesForUser( ctx context.Context, ) ([]string, error)
func (*AppHibernationServiceProxy) GetHibernationStatsForUser ¶
func (p *AppHibernationServiceProxy) GetHibernationStatsForUser( ctx context.Context, packageNames []string, ) (map[string]HibernationStats, error)
func (*AppHibernationServiceProxy) IsHibernatingForUser ¶
func (*AppHibernationServiceProxy) IsHibernatingGlobally ¶
func (*AppHibernationServiceProxy) IsOatArtifactDeletionEnabled ¶
func (p *AppHibernationServiceProxy) IsOatArtifactDeletionEnabled( ctx context.Context, ) (bool, error)
func (*AppHibernationServiceProxy) SetHibernatingForUser ¶
func (*AppHibernationServiceProxy) SetHibernatingGlobally ¶
type AppHibernationServiceStub ¶
type AppHibernationServiceStub struct {
Impl IAppHibernationService
Transport binder.VersionAwareTransport
}
AppHibernationServiceStub dispatches incoming binder transactions to a typed IAppHibernationService implementation.
func (*AppHibernationServiceStub) Descriptor ¶
func (s *AppHibernationServiceStub) Descriptor() string
func (*AppHibernationServiceStub) OnTransaction ¶
func (s *AppHibernationServiceStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type HibernationStats ¶
type HibernationStats struct {
DiskBytesSaved int64
}
func (*HibernationStats) MarshalParcel ¶
func (s *HibernationStats) MarshalParcel( p *parcel.Parcel, ) error
func (*HibernationStats) UnmarshalParcel ¶
func (s *HibernationStats) UnmarshalParcel( p *parcel.Parcel, ) error
type IAppHibernationService ¶
type IAppHibernationService interface {
AsBinder() binder.IBinder
IsHibernatingForUser(ctx context.Context, packageName string) (bool, error)
SetHibernatingForUser(ctx context.Context, packageName string, isHibernating bool) error
IsHibernatingGlobally(ctx context.Context, packageName string) (bool, error)
SetHibernatingGlobally(ctx context.Context, packageName string, isHibernating bool) error
GetHibernatingPackagesForUser(ctx context.Context) ([]string, error)
GetHibernationStatsForUser(ctx context.Context, packageNames []string) (map[string]HibernationStats, error)
IsOatArtifactDeletionEnabled(ctx context.Context) (bool, error)
}
func NewAppHibernationServiceStub ¶
func NewAppHibernationServiceStub( impl IAppHibernationServiceServer, ) IAppHibernationService
NewAppHibernationServiceStub creates a server-side IAppHibernationService wrapping the given server implementation. The returned value satisfies IAppHibernationService 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 IAppHibernationServiceServer ¶
type IAppHibernationServiceServer interface {
IsHibernatingForUser(ctx context.Context, packageName string) (bool, error)
SetHibernatingForUser(ctx context.Context, packageName string, isHibernating bool) error
IsHibernatingGlobally(ctx context.Context, packageName string) (bool, error)
SetHibernatingGlobally(ctx context.Context, packageName string, isHibernating bool) error
GetHibernatingPackagesForUser(ctx context.Context) ([]string, error)
GetHibernationStatsForUser(ctx context.Context, packageNames []string) (map[string]HibernationStats, error)
IsOatArtifactDeletionEnabled(ctx context.Context) (bool, error)
}
IAppHibernationServiceServer is the server-side interface that user implementations provide to NewAppHibernationServiceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
Click to show internal directories.
Click to hide internal directories.