Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionISuspendControlServiceInternalEnableAutosuspend = binder.FirstCallTransaction + 0
	TransactionISuspendControlServiceInternalForceSuspend      = binder.FirstCallTransaction + 1
	TransactionISuspendControlServiceInternalGetWakeLockStats  = binder.FirstCallTransaction + 2
	TransactionISuspendControlServiceInternalGetWakeupStats    = binder.FirstCallTransaction + 3
	TransactionISuspendControlServiceInternalGetSuspendStats   = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodISuspendControlServiceInternalEnableAutosuspend = "enableAutosuspend"
	MethodISuspendControlServiceInternalForceSuspend      = "forceSuspend"
	MethodISuspendControlServiceInternalGetWakeLockStats  = "getWakeLockStats"
	MethodISuspendControlServiceInternalGetWakeupStats    = "getWakeupStats"
	MethodISuspendControlServiceInternalGetSuspendStats   = "getSuspendStats"
)
View Source
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

type SuspendControlServiceInternalProxy struct {
	Remote binder.IBinder
}

func NewSuspendControlServiceInternalProxy

func NewSuspendControlServiceInternalProxy(
	remote binder.IBinder,
) *SuspendControlServiceInternalProxy

func (*SuspendControlServiceInternalProxy) AsBinder

func (*SuspendControlServiceInternalProxy) EnableAutosuspend

func (p *SuspendControlServiceInternalProxy) EnableAutosuspend(
	ctx context.Context,
	token binder.IBinder,
) (bool, error)

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

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

type WakeupInfo struct {
	Name  string
	Count int64
}

func (*WakeupInfo) MarshalParcel

func (s *WakeupInfo) MarshalParcel(
	p *parcel.Parcel,
) error

func (*WakeupInfo) UnmarshalParcel

func (s *WakeupInfo) UnmarshalParcel(
	p *parcel.Parcel,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL