Documentation
¶
Index ¶
- Constants
- type ISuspendControlServiceInternal
- type ISuspendControlServiceInternalServer
- type SuspendControlServiceInternalProxy
- func (p *SuspendControlServiceInternalProxy) AsBinder() binder.IBinder
- func (p *SuspendControlServiceInternalProxy) EnableAutosuspend(ctx context.Context, token binder.IBinder) (bool, error)
- func (p *SuspendControlServiceInternalProxy) ForceSuspend(ctx context.Context) (bool, error)
- func (p *SuspendControlServiceInternalProxy) GetSuspendStats(ctx context.Context) (SuspendInfo, error)
- func (p *SuspendControlServiceInternalProxy) GetWakeLockStats(ctx context.Context) ([]WakeLockInfo, error)
- func (p *SuspendControlServiceInternalProxy) GetWakeupStats(ctx context.Context) ([]WakeupInfo, error)
- type SuspendControlServiceInternalStub
- type SuspendInfo
- type WakeLockInfo
- type WakeupInfo
Constants ¶
const ( TransactionISuspendControlServiceInternalEnableAutosuspend = binder.FirstCallTransaction + 0 TransactionISuspendControlServiceInternalForceSuspend = binder.FirstCallTransaction + 1 TransactionISuspendControlServiceInternalGetWakeLockStats = binder.FirstCallTransaction + 2 TransactionISuspendControlServiceInternalGetWakeupStats = binder.FirstCallTransaction + 3 TransactionISuspendControlServiceInternalGetSuspendStats = binder.FirstCallTransaction + 4 )
const ( MethodISuspendControlServiceInternalEnableAutosuspend = "enableAutosuspend" MethodISuspendControlServiceInternalForceSuspend = "forceSuspend" MethodISuspendControlServiceInternalGetWakeLockStats = "getWakeLockStats" MethodISuspendControlServiceInternalGetWakeupStats = "getWakeupStats" MethodISuspendControlServiceInternalGetSuspendStats = "getSuspendStats" )
const DescriptorISuspendControlServiceInternal = "android.system.suspend.internal.ISuspendControlServiceInternal"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISuspendControlServiceInternal ¶
type ISuspendControlServiceInternal interface {
AsBinder() binder.IBinder
EnableAutosuspend(ctx context.Context, token binder.IBinder) (bool, error)
ForceSuspend(ctx context.Context) (bool, error)
GetWakeLockStats(ctx context.Context) ([]WakeLockInfo, error)
GetWakeupStats(ctx context.Context) ([]WakeupInfo, error)
GetSuspendStats(ctx context.Context) (SuspendInfo, error)
}
func NewSuspendControlServiceInternalStub ¶
func NewSuspendControlServiceInternalStub( impl ISuspendControlServiceInternalServer, ) ISuspendControlServiceInternal
NewSuspendControlServiceInternalStub creates a server-side ISuspendControlServiceInternal wrapping the given server implementation. The returned value satisfies ISuspendControlServiceInternal 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 ISuspendControlServiceInternalServer ¶
type ISuspendControlServiceInternalServer interface {
EnableAutosuspend(ctx context.Context, token binder.IBinder) (bool, error)
ForceSuspend(ctx context.Context) (bool, error)
GetWakeLockStats(ctx context.Context) ([]WakeLockInfo, error)
GetWakeupStats(ctx context.Context) ([]WakeupInfo, error)
GetSuspendStats(ctx context.Context) (SuspendInfo, error)
}
ISuspendControlServiceInternalServer is the server-side interface that user implementations provide to NewSuspendControlServiceInternalStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type SuspendControlServiceInternalProxy ¶
func NewSuspendControlServiceInternalProxy ¶
func NewSuspendControlServiceInternalProxy( remote binder.IBinder, ) *SuspendControlServiceInternalProxy
func (*SuspendControlServiceInternalProxy) AsBinder ¶
func (p *SuspendControlServiceInternalProxy) AsBinder() binder.IBinder
func (*SuspendControlServiceInternalProxy) EnableAutosuspend ¶
func (*SuspendControlServiceInternalProxy) ForceSuspend ¶
func (p *SuspendControlServiceInternalProxy) ForceSuspend( ctx context.Context, ) (bool, error)
func (*SuspendControlServiceInternalProxy) GetSuspendStats ¶
func (p *SuspendControlServiceInternalProxy) GetSuspendStats( ctx context.Context, ) (SuspendInfo, error)
func (*SuspendControlServiceInternalProxy) GetWakeLockStats ¶
func (p *SuspendControlServiceInternalProxy) GetWakeLockStats( ctx context.Context, ) ([]WakeLockInfo, error)
func (*SuspendControlServiceInternalProxy) GetWakeupStats ¶
func (p *SuspendControlServiceInternalProxy) GetWakeupStats( ctx context.Context, ) ([]WakeupInfo, error)
type SuspendControlServiceInternalStub ¶
type SuspendControlServiceInternalStub struct {
Impl ISuspendControlServiceInternal
Transport binder.VersionAwareTransport
}
SuspendControlServiceInternalStub dispatches incoming binder transactions to a typed ISuspendControlServiceInternal implementation.
func (*SuspendControlServiceInternalStub) Descriptor ¶
func (s *SuspendControlServiceInternalStub) Descriptor() string
func (*SuspendControlServiceInternalStub) OnTransaction ¶
func (s *SuspendControlServiceInternalStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type SuspendInfo ¶
type SuspendInfo struct {
SuspendAttemptCount int64
FailedSuspendCount int64
ShortSuspendCount int64
SuspendTimeMillis int64
ShortSuspendTimeMillis int64
SuspendOverheadTimeMillis int64
FailedSuspendOverheadTimeMillis int64
NewBackoffCount int64
BackoffContinueCount int64
SleepTimeMillis int64
}
func (*SuspendInfo) MarshalParcel ¶
func (s *SuspendInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*SuspendInfo) UnmarshalParcel ¶
func (s *SuspendInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type WakeLockInfo ¶
type WakeLockInfo struct {
Name string
ActiveCount int64
LastChange int64
MaxTime int64
TotalTime int64
IsActive bool
ActiveTime int64
IsKernelWakelock bool
Pid int32
EventCount int64
ExpireCount int64
PreventSuspendTime int64
WakeupCount int64
}
func (*WakeLockInfo) MarshalParcel ¶
func (s *WakeLockInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*WakeLockInfo) UnmarshalParcel ¶
func (s *WakeLockInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type WakeupInfo ¶
func (*WakeupInfo) MarshalParcel ¶
func (s *WakeupInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*WakeupInfo) UnmarshalParcel ¶
func (s *WakeupInfo) UnmarshalParcel( p *parcel.Parcel, ) error