usage

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIStorageStatsManagerIsQuotaSupported          = binder.FirstCallTransaction + 0
	TransactionIStorageStatsManagerIsReservedSupported       = binder.FirstCallTransaction + 1
	TransactionIStorageStatsManagerGetTotalBytes             = binder.FirstCallTransaction + 2
	TransactionIStorageStatsManagerGetFreeBytes              = binder.FirstCallTransaction + 3
	TransactionIStorageStatsManagerGetCacheBytes             = binder.FirstCallTransaction + 4
	TransactionIStorageStatsManagerGetCacheQuotaBytes        = binder.FirstCallTransaction + 5
	TransactionIStorageStatsManagerQueryStatsForPackage      = binder.FirstCallTransaction + 6
	TransactionIStorageStatsManagerQueryStatsForUid          = binder.FirstCallTransaction + 7
	TransactionIStorageStatsManagerQueryStatsForUser         = binder.FirstCallTransaction + 8
	TransactionIStorageStatsManagerQueryExternalStatsForUser = binder.FirstCallTransaction + 9
	TransactionIStorageStatsManagerQueryCratesForPackage     = binder.FirstCallTransaction + 10
	TransactionIStorageStatsManagerQueryCratesForUid         = binder.FirstCallTransaction + 11
	TransactionIStorageStatsManagerQueryCratesForUser        = binder.FirstCallTransaction + 12
)
View Source
const (
	MethodIStorageStatsManagerIsQuotaSupported          = "isQuotaSupported"
	MethodIStorageStatsManagerIsReservedSupported       = "isReservedSupported"
	MethodIStorageStatsManagerGetTotalBytes             = "getTotalBytes"
	MethodIStorageStatsManagerGetFreeBytes              = "getFreeBytes"
	MethodIStorageStatsManagerGetCacheBytes             = "getCacheBytes"
	MethodIStorageStatsManagerGetCacheQuotaBytes        = "getCacheQuotaBytes"
	MethodIStorageStatsManagerQueryStatsForPackage      = "queryStatsForPackage"
	MethodIStorageStatsManagerQueryStatsForUid          = "queryStatsForUid"
	MethodIStorageStatsManagerQueryStatsForUser         = "queryStatsForUser"
	MethodIStorageStatsManagerQueryExternalStatsForUser = "queryExternalStatsForUser"
	MethodIStorageStatsManagerQueryCratesForPackage     = "queryCratesForPackage"
	MethodIStorageStatsManagerQueryCratesForUid         = "queryCratesForUid"
	MethodIStorageStatsManagerQueryCratesForUser        = "queryCratesForUser"
)
View Source
const (
	TransactionIUsageStatsManagerQueryUsageStats                             = binder.FirstCallTransaction + 0
	TransactionIUsageStatsManagerQueryConfigurationStats                     = binder.FirstCallTransaction + 1
	TransactionIUsageStatsManagerQueryEventStats                             = binder.FirstCallTransaction + 2
	TransactionIUsageStatsManagerQueryEvents                                 = binder.FirstCallTransaction + 3
	TransactionIUsageStatsManagerQueryEventsForPackage                       = binder.FirstCallTransaction + 4
	TransactionIUsageStatsManagerQueryEventsForUser                          = binder.FirstCallTransaction + 5
	TransactionIUsageStatsManagerQueryEventsForPackageForUser                = binder.FirstCallTransaction + 6
	TransactionIUsageStatsManagerQueryEventsWithFilter                       = binder.FirstCallTransaction + 7
	TransactionIUsageStatsManagerSetAppInactive                              = binder.FirstCallTransaction + 8
	TransactionIUsageStatsManagerIsAppStandbyEnabled                         = binder.FirstCallTransaction + 9
	TransactionIUsageStatsManagerIsAppInactive                               = binder.FirstCallTransaction + 10
	TransactionIUsageStatsManagerOnCarrierPrivilegedAppsChanged              = binder.FirstCallTransaction + 11
	TransactionIUsageStatsManagerReportChooserSelection                      = binder.FirstCallTransaction + 12
	TransactionIUsageStatsManagerGetAppStandbyBucket                         = binder.FirstCallTransaction + 13
	TransactionIUsageStatsManagerSetAppStandbyBucket                         = binder.FirstCallTransaction + 14
	TransactionIUsageStatsManagerGetAppStandbyBuckets                        = binder.FirstCallTransaction + 15
	TransactionIUsageStatsManagerSetAppStandbyBuckets                        = binder.FirstCallTransaction + 16
	TransactionIUsageStatsManagerGetAppMinStandbyBucket                      = binder.FirstCallTransaction + 17
	TransactionIUsageStatsManagerSetEstimatedLaunchTime                      = binder.FirstCallTransaction + 18
	TransactionIUsageStatsManagerSetEstimatedLaunchTimes                     = binder.FirstCallTransaction + 19
	TransactionIUsageStatsManagerRegisterAppUsageObserver                    = binder.FirstCallTransaction + 20
	TransactionIUsageStatsManagerUnregisterAppUsageObserver                  = binder.FirstCallTransaction + 21
	TransactionIUsageStatsManagerRegisterUsageSessionObserver                = binder.FirstCallTransaction + 22
	TransactionIUsageStatsManagerUnregisterUsageSessionObserver              = binder.FirstCallTransaction + 23
	TransactionIUsageStatsManagerRegisterAppUsageLimitObserver               = binder.FirstCallTransaction + 24
	TransactionIUsageStatsManagerUnregisterAppUsageLimitObserver             = binder.FirstCallTransaction + 25
	TransactionIUsageStatsManagerReportUsageStart                            = binder.FirstCallTransaction + 26
	TransactionIUsageStatsManagerReportPastUsageStart                        = binder.FirstCallTransaction + 27
	TransactionIUsageStatsManagerReportUsageStop                             = binder.FirstCallTransaction + 28
	TransactionIUsageStatsManagerReportUserInteraction                       = binder.FirstCallTransaction + 29
	TransactionIUsageStatsManagerReportUserInteractionWithBundle             = binder.FirstCallTransaction + 30
	TransactionIUsageStatsManagerGetUsageSource                              = binder.FirstCallTransaction + 31
	TransactionIUsageStatsManagerForceUsageSourceSettingRead                 = binder.FirstCallTransaction + 32
	TransactionIUsageStatsManagerGetLastTimeAnyComponentUsed                 = binder.FirstCallTransaction + 33
	TransactionIUsageStatsManagerQueryBroadcastResponseStats                 = binder.FirstCallTransaction + 34
	TransactionIUsageStatsManagerClearBroadcastResponseStats                 = binder.FirstCallTransaction + 35
	TransactionIUsageStatsManagerClearBroadcastEvents                        = binder.FirstCallTransaction + 36
	TransactionIUsageStatsManagerIsPackageExemptedFromBroadcastResponseStats = binder.FirstCallTransaction + 37
	TransactionIUsageStatsManagerGetAppStandbyConstant                       = binder.FirstCallTransaction + 38
)
View Source
const (
	MethodIUsageStatsManagerQueryUsageStats                             = "queryUsageStats"
	MethodIUsageStatsManagerQueryConfigurationStats                     = "queryConfigurationStats"
	MethodIUsageStatsManagerQueryEventStats                             = "queryEventStats"
	MethodIUsageStatsManagerQueryEvents                                 = "queryEvents"
	MethodIUsageStatsManagerQueryEventsForPackage                       = "queryEventsForPackage"
	MethodIUsageStatsManagerQueryEventsForUser                          = "queryEventsForUser"
	MethodIUsageStatsManagerQueryEventsForPackageForUser                = "queryEventsForPackageForUser"
	MethodIUsageStatsManagerQueryEventsWithFilter                       = "queryEventsWithFilter"
	MethodIUsageStatsManagerSetAppInactive                              = "setAppInactive"
	MethodIUsageStatsManagerIsAppStandbyEnabled                         = "isAppStandbyEnabled"
	MethodIUsageStatsManagerIsAppInactive                               = "isAppInactive"
	MethodIUsageStatsManagerOnCarrierPrivilegedAppsChanged              = "onCarrierPrivilegedAppsChanged"
	MethodIUsageStatsManagerReportChooserSelection                      = "reportChooserSelection"
	MethodIUsageStatsManagerGetAppStandbyBucket                         = "getAppStandbyBucket"
	MethodIUsageStatsManagerSetAppStandbyBucket                         = "setAppStandbyBucket"
	MethodIUsageStatsManagerGetAppStandbyBuckets                        = "getAppStandbyBuckets"
	MethodIUsageStatsManagerSetAppStandbyBuckets                        = "setAppStandbyBuckets"
	MethodIUsageStatsManagerGetAppMinStandbyBucket                      = "getAppMinStandbyBucket"
	MethodIUsageStatsManagerSetEstimatedLaunchTime                      = "setEstimatedLaunchTime"
	MethodIUsageStatsManagerSetEstimatedLaunchTimes                     = "setEstimatedLaunchTimes"
	MethodIUsageStatsManagerRegisterAppUsageObserver                    = "registerAppUsageObserver"
	MethodIUsageStatsManagerUnregisterAppUsageObserver                  = "unregisterAppUsageObserver"
	MethodIUsageStatsManagerRegisterUsageSessionObserver                = "registerUsageSessionObserver"
	MethodIUsageStatsManagerUnregisterUsageSessionObserver              = "unregisterUsageSessionObserver"
	MethodIUsageStatsManagerRegisterAppUsageLimitObserver               = "registerAppUsageLimitObserver"
	MethodIUsageStatsManagerUnregisterAppUsageLimitObserver             = "unregisterAppUsageLimitObserver"
	MethodIUsageStatsManagerReportUsageStart                            = "reportUsageStart"
	MethodIUsageStatsManagerReportPastUsageStart                        = "reportPastUsageStart"
	MethodIUsageStatsManagerReportUsageStop                             = "reportUsageStop"
	MethodIUsageStatsManagerReportUserInteraction                       = "reportUserInteraction"
	MethodIUsageStatsManagerReportUserInteractionWithBundle             = "reportUserInteractionWithBundle"
	MethodIUsageStatsManagerGetUsageSource                              = "getUsageSource"
	MethodIUsageStatsManagerForceUsageSourceSettingRead                 = "forceUsageSourceSettingRead"
	MethodIUsageStatsManagerGetLastTimeAnyComponentUsed                 = "getLastTimeAnyComponentUsed"
	MethodIUsageStatsManagerQueryBroadcastResponseStats                 = "queryBroadcastResponseStats"
	MethodIUsageStatsManagerClearBroadcastResponseStats                 = "clearBroadcastResponseStats"
	MethodIUsageStatsManagerClearBroadcastEvents                        = "clearBroadcastEvents"
	MethodIUsageStatsManagerIsPackageExemptedFromBroadcastResponseStats = "isPackageExemptedFromBroadcastResponseStats"
	MethodIUsageStatsManagerGetAppStandbyConstant                       = "getAppStandbyConstant"
)
View Source
const DescriptorICacheQuotaService = "android.app.usage.ICacheQuotaService"
View Source
const DescriptorIStorageStatsManager = "android.app.usage.IStorageStatsManager"
View Source
const DescriptorIUsageStatsManager = "android.app.usage.IUsageStatsManager"
View Source
const (
	MethodICacheQuotaServiceComputeCacheQuotaHints = "computeCacheQuotaHints"
)
View Source
const (
	TransactionICacheQuotaServiceComputeCacheQuotaHints = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastResponseStats

type BroadcastResponseStats struct {
	PackageName                 string
	Id                          int64
	BroadcastsDispatchedCount   int32
	NotificationsPostedCount    int32
	NotificationsUpdatedCount   int32
	NotificationsCancelledCount int32
}

func (*BroadcastResponseStats) MarshalParcel

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

func (*BroadcastResponseStats) UnmarshalParcel

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

type BroadcastResponseStatsList

type BroadcastResponseStatsList struct {
}

func (*BroadcastResponseStatsList) MarshalParcel

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

func (*BroadcastResponseStatsList) UnmarshalParcel

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

type CacheQuotaHint

type CacheQuotaHint struct {
	Uuid  string
	Uid   int32
	Quota int64
}

func (*CacheQuotaHint) MarshalParcel

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

func (*CacheQuotaHint) UnmarshalParcel

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

type CacheQuotaServiceProxy

type CacheQuotaServiceProxy struct {
	Remote binder.IBinder
}

func NewCacheQuotaServiceProxy

func NewCacheQuotaServiceProxy(
	remote binder.IBinder,
) *CacheQuotaServiceProxy

func (*CacheQuotaServiceProxy) AsBinder

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

func (*CacheQuotaServiceProxy) ComputeCacheQuotaHints

func (p *CacheQuotaServiceProxy) ComputeCacheQuotaHints(
	ctx context.Context,
	callback os.RemoteCallback,
	requests []CacheQuotaHint,
) error

type CacheQuotaServiceStub

type CacheQuotaServiceStub struct {
	Impl      ICacheQuotaService
	Transport binder.VersionAwareTransport
}

CacheQuotaServiceStub dispatches incoming binder transactions to a typed ICacheQuotaService implementation.

func (*CacheQuotaServiceStub) Descriptor

func (s *CacheQuotaServiceStub) Descriptor() string

func (*CacheQuotaServiceStub) OnTransaction

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

type ExternalStorageStats

type ExternalStorageStats struct {
	TotalBytes int64
	AudioBytes int64
	VideoBytes int64
	ImageBytes int64
	AppBytes   int64
	ObbBytes   int64
}

func (*ExternalStorageStats) MarshalParcel

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

func (*ExternalStorageStats) UnmarshalParcel

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

type ICacheQuotaService

type ICacheQuotaService interface {
	AsBinder() binder.IBinder
	ComputeCacheQuotaHints(ctx context.Context, callback os.RemoteCallback, requests []CacheQuotaHint) error
}

func NewCacheQuotaServiceStub

func NewCacheQuotaServiceStub(
	impl ICacheQuotaServiceServer,
) ICacheQuotaService

NewCacheQuotaServiceStub creates a server-side ICacheQuotaService wrapping the given server implementation. The returned value satisfies ICacheQuotaService 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 ICacheQuotaServiceServer

type ICacheQuotaServiceServer interface {
	ComputeCacheQuotaHints(ctx context.Context, callback os.RemoteCallback, requests []CacheQuotaHint) error
}

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

type IStorageStatsManager

type IStorageStatsManager interface {
	AsBinder() binder.IBinder
	IsQuotaSupported(ctx context.Context, volumeUuid string) (bool, error)
	IsReservedSupported(ctx context.Context, volumeUuid string) (bool, error)
	GetTotalBytes(ctx context.Context, volumeUuid string) (int64, error)
	GetFreeBytes(ctx context.Context, volumeUuid string) (int64, error)
	GetCacheBytes(ctx context.Context, volumeUuid string) (int64, error)
	GetCacheQuotaBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
	QueryStatsForPackage(ctx context.Context, volumeUuid string, packageName string) (StorageStats, error)
	QueryStatsForUid(ctx context.Context, volumeUuid string, uid int32) (StorageStats, error)
	QueryStatsForUser(ctx context.Context, volumeUuid string) (StorageStats, error)
	QueryExternalStatsForUser(ctx context.Context, volumeUuid string) (ExternalStorageStats, error)
	QueryCratesForPackage(ctx context.Context, volumeUuid string, packageName string) (pm.ParceledListSlice, error)
	QueryCratesForUid(ctx context.Context, volumeUuid string, uid int32) (pm.ParceledListSlice, error)
	QueryCratesForUser(ctx context.Context, volumeUuid string) (pm.ParceledListSlice, error)
}

func NewStorageStatsManagerStub

func NewStorageStatsManagerStub(
	impl IStorageStatsManagerServer,
) IStorageStatsManager

NewStorageStatsManagerStub creates a server-side IStorageStatsManager wrapping the given server implementation. The returned value satisfies IStorageStatsManager 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 IStorageStatsManagerServer

type IStorageStatsManagerServer interface {
	IsQuotaSupported(ctx context.Context, volumeUuid string) (bool, error)
	IsReservedSupported(ctx context.Context, volumeUuid string) (bool, error)
	GetTotalBytes(ctx context.Context, volumeUuid string) (int64, error)
	GetFreeBytes(ctx context.Context, volumeUuid string) (int64, error)
	GetCacheBytes(ctx context.Context, volumeUuid string) (int64, error)
	GetCacheQuotaBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
	QueryStatsForPackage(ctx context.Context, volumeUuid string, packageName string) (StorageStats, error)
	QueryStatsForUid(ctx context.Context, volumeUuid string, uid int32) (StorageStats, error)
	QueryStatsForUser(ctx context.Context, volumeUuid string) (StorageStats, error)
	QueryExternalStatsForUser(ctx context.Context, volumeUuid string) (ExternalStorageStats, error)
	QueryCratesForPackage(ctx context.Context, volumeUuid string, packageName string) (pm.ParceledListSlice, error)
	QueryCratesForUid(ctx context.Context, volumeUuid string, uid int32) (pm.ParceledListSlice, error)
	QueryCratesForUser(ctx context.Context, volumeUuid string) (pm.ParceledListSlice, error)
}

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

type IUsageStatsManager

type IUsageStatsManager interface {
	AsBinder() binder.IBinder
	QueryUsageStats(ctx context.Context, bucketType int32, beginTime int64, endTime int64) (pm.ParceledListSlice, error)
	QueryConfigurationStats(ctx context.Context, bucketType int32, beginTime int64, endTime int64) (pm.ParceledListSlice, error)
	QueryEventStats(ctx context.Context, bucketType int32, beginTime int64, endTime int64) (pm.ParceledListSlice, error)
	QueryEvents(ctx context.Context, beginTime int64, endTime int64) (UsageEvents, error)
	QueryEventsForPackage(ctx context.Context, beginTime int64, endTime int64) (UsageEvents, error)
	QueryEventsForUser(ctx context.Context, beginTime int64, endTime int64) (UsageEvents, error)
	QueryEventsForPackageForUser(ctx context.Context, beginTime int64, endTime int64, pkg string) (UsageEvents, error)
	QueryEventsWithFilter(ctx context.Context, query UsageEventsQuery) (UsageEvents, error)
	SetAppInactive(ctx context.Context, packageName string, inactive bool) error
	IsAppStandbyEnabled(ctx context.Context) (bool, error)
	IsAppInactive(ctx context.Context, packageName string) (bool, error)
	OnCarrierPrivilegedAppsChanged(ctx context.Context) error
	ReportChooserSelection(ctx context.Context, packageName string, contentType string, annotations []string, action string) error
	GetAppStandbyBucket(ctx context.Context, packageName string) (int32, error)
	SetAppStandbyBucket(ctx context.Context, packageName string, bucket int32) error
	GetAppStandbyBuckets(ctx context.Context) (pm.ParceledListSlice, error)
	SetAppStandbyBuckets(ctx context.Context, appBuckets pm.ParceledListSlice) error
	GetAppMinStandbyBucket(ctx context.Context, packageName string) (int32, error)
	SetEstimatedLaunchTime(ctx context.Context, packageName string, estimatedLaunchTime int64) error
	SetEstimatedLaunchTimes(ctx context.Context, appLaunchTimes pm.ParceledListSlice) error
	RegisterAppUsageObserver(ctx context.Context, observerId int32, packages []string, timeLimitMs int64, callback app.PendingIntent) error
	UnregisterAppUsageObserver(ctx context.Context, observerId int32) error
	RegisterUsageSessionObserver(ctx context.Context, sessionObserverId int32, observed []string, timeLimitMs int64, sessionThresholdTimeMs int64, limitReachedCallbackIntent app.PendingIntent, sessionEndCallbackIntent app.PendingIntent) error
	UnregisterUsageSessionObserver(ctx context.Context, sessionObserverId int32) error
	RegisterAppUsageLimitObserver(ctx context.Context, observerId int32, packages []string, timeLimitMs int64, timeUsedMs int64, callback app.PendingIntent) error
	UnregisterAppUsageLimitObserver(ctx context.Context, observerId int32) error
	ReportUsageStart(ctx context.Context, activity binder.IBinder, token string) error
	ReportPastUsageStart(ctx context.Context, activity binder.IBinder, token string, timeAgoMs int64) error
	ReportUsageStop(ctx context.Context, activity binder.IBinder, token string) error
	ReportUserInteraction(ctx context.Context, packageName string) error
	ReportUserInteractionWithBundle(ctx context.Context, packageName string, eventExtras os.PersistableBundle) error
	GetUsageSource(ctx context.Context) (int32, error)
	ForceUsageSourceSettingRead(ctx context.Context) error
	GetLastTimeAnyComponentUsed(ctx context.Context, packageName string) (int64, error)
	QueryBroadcastResponseStats(ctx context.Context, packageName string, id int64) (BroadcastResponseStatsList, error)
	ClearBroadcastResponseStats(ctx context.Context, packageName string, id int64) error
	ClearBroadcastEvents(ctx context.Context) error
	IsPackageExemptedFromBroadcastResponseStats(ctx context.Context, packageName string) (bool, error)
	GetAppStandbyConstant(ctx context.Context, key string) (string, error)
}

func NewUsageStatsManagerStub

func NewUsageStatsManagerStub(
	impl IUsageStatsManagerServer,
) IUsageStatsManager

NewUsageStatsManagerStub creates a server-side IUsageStatsManager wrapping the given server implementation. The returned value satisfies IUsageStatsManager 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 IUsageStatsManagerServer

type IUsageStatsManagerServer interface {
	QueryUsageStats(ctx context.Context, bucketType int32, beginTime int64, endTime int64) (pm.ParceledListSlice, error)
	QueryConfigurationStats(ctx context.Context, bucketType int32, beginTime int64, endTime int64) (pm.ParceledListSlice, error)
	QueryEventStats(ctx context.Context, bucketType int32, beginTime int64, endTime int64) (pm.ParceledListSlice, error)
	QueryEvents(ctx context.Context, beginTime int64, endTime int64) (UsageEvents, error)
	QueryEventsForPackage(ctx context.Context, beginTime int64, endTime int64) (UsageEvents, error)
	QueryEventsForUser(ctx context.Context, beginTime int64, endTime int64) (UsageEvents, error)
	QueryEventsForPackageForUser(ctx context.Context, beginTime int64, endTime int64, pkg string) (UsageEvents, error)
	QueryEventsWithFilter(ctx context.Context, query UsageEventsQuery) (UsageEvents, error)
	SetAppInactive(ctx context.Context, packageName string, inactive bool) error
	IsAppStandbyEnabled(ctx context.Context) (bool, error)
	IsAppInactive(ctx context.Context, packageName string) (bool, error)
	OnCarrierPrivilegedAppsChanged(ctx context.Context) error
	ReportChooserSelection(ctx context.Context, packageName string, contentType string, annotations []string, action string) error
	GetAppStandbyBucket(ctx context.Context, packageName string) (int32, error)
	SetAppStandbyBucket(ctx context.Context, packageName string, bucket int32) error
	GetAppStandbyBuckets(ctx context.Context) (pm.ParceledListSlice, error)
	SetAppStandbyBuckets(ctx context.Context, appBuckets pm.ParceledListSlice) error
	GetAppMinStandbyBucket(ctx context.Context, packageName string) (int32, error)
	SetEstimatedLaunchTime(ctx context.Context, packageName string, estimatedLaunchTime int64) error
	SetEstimatedLaunchTimes(ctx context.Context, appLaunchTimes pm.ParceledListSlice) error
	RegisterAppUsageObserver(ctx context.Context, observerId int32, packages []string, timeLimitMs int64, callback app.PendingIntent) error
	UnregisterAppUsageObserver(ctx context.Context, observerId int32) error
	RegisterUsageSessionObserver(ctx context.Context, sessionObserverId int32, observed []string, timeLimitMs int64, sessionThresholdTimeMs int64, limitReachedCallbackIntent app.PendingIntent, sessionEndCallbackIntent app.PendingIntent) error
	UnregisterUsageSessionObserver(ctx context.Context, sessionObserverId int32) error
	RegisterAppUsageLimitObserver(ctx context.Context, observerId int32, packages []string, timeLimitMs int64, timeUsedMs int64, callback app.PendingIntent) error
	UnregisterAppUsageLimitObserver(ctx context.Context, observerId int32) error
	ReportUsageStart(ctx context.Context, activity binder.IBinder, token string) error
	ReportPastUsageStart(ctx context.Context, activity binder.IBinder, token string, timeAgoMs int64) error
	ReportUsageStop(ctx context.Context, activity binder.IBinder, token string) error
	ReportUserInteraction(ctx context.Context, packageName string) error
	ReportUserInteractionWithBundle(ctx context.Context, packageName string, eventExtras os.PersistableBundle) error
	GetUsageSource(ctx context.Context) (int32, error)
	ForceUsageSourceSettingRead(ctx context.Context) error
	GetLastTimeAnyComponentUsed(ctx context.Context, packageName string) (int64, error)
	QueryBroadcastResponseStats(ctx context.Context, packageName string, id int64) (BroadcastResponseStatsList, error)
	ClearBroadcastResponseStats(ctx context.Context, packageName string, id int64) error
	ClearBroadcastEvents(ctx context.Context) error
	IsPackageExemptedFromBroadcastResponseStats(ctx context.Context, packageName string) (bool, error)
	GetAppStandbyConstant(ctx context.Context, key string) (string, error)
}

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

type PackageUsageStats

type PackageUsageStats struct {
}

func (*PackageUsageStats) MarshalParcel

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

func (*PackageUsageStats) UnmarshalParcel

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

type ParcelableUsageEventList

type ParcelableUsageEventList struct {
	N int32
}

func (*ParcelableUsageEventList) MarshalParcel

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

func (*ParcelableUsageEventList) UnmarshalParcel

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

type StorageStats

type StorageStats struct {
	CodeBytes          int64
	DataBytes          int64
	CacheBytes         int64
	DexoptBytes        int64
	RefProfBytes       int64
	CurProfBytes       int64
	ApkBytes           int64
	LibBytes           int64
	DmBytes            int64
	ExternalCacheBytes int64
}

func (*StorageStats) MarshalParcel

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

func (*StorageStats) UnmarshalParcel

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

type StorageStatsManagerProxy

type StorageStatsManagerProxy struct {
	Remote binder.IBinder
}

func GetStorageStatsManager

func GetStorageStatsManager(
	ctx context.Context,
	sm *servicemanager.ServiceManager,
) (*StorageStatsManagerProxy, error)

GetStorageStatsManager retrieves the StorageStatsService service and returns a typed proxy.

func NewStorageStatsManagerProxy

func NewStorageStatsManagerProxy(
	remote binder.IBinder,
) *StorageStatsManagerProxy

func (*StorageStatsManagerProxy) AsBinder

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

func (*StorageStatsManagerProxy) GetCacheBytes

func (p *StorageStatsManagerProxy) GetCacheBytes(
	ctx context.Context,
	volumeUuid string,
) (int64, error)

func (*StorageStatsManagerProxy) GetCacheQuotaBytes

func (p *StorageStatsManagerProxy) GetCacheQuotaBytes(
	ctx context.Context,
	volumeUuid string,
	uid int32,
) (int64, error)

func (*StorageStatsManagerProxy) GetFreeBytes

func (p *StorageStatsManagerProxy) GetFreeBytes(
	ctx context.Context,
	volumeUuid string,
) (int64, error)

func (*StorageStatsManagerProxy) GetTotalBytes

func (p *StorageStatsManagerProxy) GetTotalBytes(
	ctx context.Context,
	volumeUuid string,
) (int64, error)

func (*StorageStatsManagerProxy) IsQuotaSupported

func (p *StorageStatsManagerProxy) IsQuotaSupported(
	ctx context.Context,
	volumeUuid string,
) (bool, error)

func (*StorageStatsManagerProxy) IsReservedSupported

func (p *StorageStatsManagerProxy) IsReservedSupported(
	ctx context.Context,
	volumeUuid string,
) (bool, error)

func (*StorageStatsManagerProxy) QueryCratesForPackage

func (p *StorageStatsManagerProxy) QueryCratesForPackage(
	ctx context.Context,
	volumeUuid string,
	packageName string,
) (pm.ParceledListSlice, error)

func (*StorageStatsManagerProxy) QueryCratesForUid

func (p *StorageStatsManagerProxy) QueryCratesForUid(
	ctx context.Context,
	volumeUuid string,
	uid int32,
) (pm.ParceledListSlice, error)

func (*StorageStatsManagerProxy) QueryCratesForUser

func (p *StorageStatsManagerProxy) QueryCratesForUser(
	ctx context.Context,
	volumeUuid string,
) (pm.ParceledListSlice, error)

func (*StorageStatsManagerProxy) QueryExternalStatsForUser

func (p *StorageStatsManagerProxy) QueryExternalStatsForUser(
	ctx context.Context,
	volumeUuid string,
) (ExternalStorageStats, error)

func (*StorageStatsManagerProxy) QueryStatsForPackage

func (p *StorageStatsManagerProxy) QueryStatsForPackage(
	ctx context.Context,
	volumeUuid string,
	packageName string,
) (StorageStats, error)

func (*StorageStatsManagerProxy) QueryStatsForUid

func (p *StorageStatsManagerProxy) QueryStatsForUid(
	ctx context.Context,
	volumeUuid string,
	uid int32,
) (StorageStats, error)

func (*StorageStatsManagerProxy) QueryStatsForUser

func (p *StorageStatsManagerProxy) QueryStatsForUser(
	ctx context.Context,
	volumeUuid string,
) (StorageStats, error)

type StorageStatsManagerStub

type StorageStatsManagerStub struct {
	Impl      IStorageStatsManager
	Transport binder.VersionAwareTransport
}

StorageStatsManagerStub dispatches incoming binder transactions to a typed IStorageStatsManager implementation.

func (*StorageStatsManagerStub) Descriptor

func (s *StorageStatsManagerStub) Descriptor() string

func (*StorageStatsManagerStub) OnTransaction

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

type UsageEvents

type UsageEvents struct {
}

func (*UsageEvents) MarshalParcel

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

func (*UsageEvents) UnmarshalParcel

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

type UsageEventsQuery

type UsageEventsQuery struct {
	BeginTimeMillis int64
	EndTimeMillis   int64
	UserId          int32
}

func (*UsageEventsQuery) MarshalParcel

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

func (*UsageEventsQuery) UnmarshalParcel

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

type UsageStatsManagerProxy

type UsageStatsManagerProxy struct {
	Remote binder.IBinder
}

func GetUsageStatsManager

func GetUsageStatsManager(
	ctx context.Context,
	sm *servicemanager.ServiceManager,
) (*UsageStatsManagerProxy, error)

GetUsageStatsManager retrieves the UsageStatsService service and returns a typed proxy.

func NewUsageStatsManagerProxy

func NewUsageStatsManagerProxy(
	remote binder.IBinder,
) *UsageStatsManagerProxy

func (*UsageStatsManagerProxy) AsBinder

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

func (*UsageStatsManagerProxy) ClearBroadcastEvents

func (p *UsageStatsManagerProxy) ClearBroadcastEvents(
	ctx context.Context,
) error

func (*UsageStatsManagerProxy) ClearBroadcastResponseStats

func (p *UsageStatsManagerProxy) ClearBroadcastResponseStats(
	ctx context.Context,
	packageName string,
	id int64,
) error

func (*UsageStatsManagerProxy) ForceUsageSourceSettingRead

func (p *UsageStatsManagerProxy) ForceUsageSourceSettingRead(
	ctx context.Context,
) error

func (*UsageStatsManagerProxy) GetAppMinStandbyBucket

func (p *UsageStatsManagerProxy) GetAppMinStandbyBucket(
	ctx context.Context,
	packageName string,
) (int32, error)

func (*UsageStatsManagerProxy) GetAppStandbyBucket

func (p *UsageStatsManagerProxy) GetAppStandbyBucket(
	ctx context.Context,
	packageName string,
) (int32, error)

func (*UsageStatsManagerProxy) GetAppStandbyBuckets

func (p *UsageStatsManagerProxy) GetAppStandbyBuckets(
	ctx context.Context,
) (pm.ParceledListSlice, error)

func (*UsageStatsManagerProxy) GetAppStandbyConstant

func (p *UsageStatsManagerProxy) GetAppStandbyConstant(
	ctx context.Context,
	key string,
) (string, error)

func (*UsageStatsManagerProxy) GetLastTimeAnyComponentUsed

func (p *UsageStatsManagerProxy) GetLastTimeAnyComponentUsed(
	ctx context.Context,
	packageName string,
) (int64, error)

func (*UsageStatsManagerProxy) GetUsageSource

func (p *UsageStatsManagerProxy) GetUsageSource(
	ctx context.Context,
) (int32, error)

func (*UsageStatsManagerProxy) IsAppInactive

func (p *UsageStatsManagerProxy) IsAppInactive(
	ctx context.Context,
	packageName string,
) (bool, error)

func (*UsageStatsManagerProxy) IsAppStandbyEnabled

func (p *UsageStatsManagerProxy) IsAppStandbyEnabled(
	ctx context.Context,
) (bool, error)

func (*UsageStatsManagerProxy) IsPackageExemptedFromBroadcastResponseStats

func (p *UsageStatsManagerProxy) IsPackageExemptedFromBroadcastResponseStats(
	ctx context.Context,
	packageName string,
) (bool, error)

func (*UsageStatsManagerProxy) OnCarrierPrivilegedAppsChanged

func (p *UsageStatsManagerProxy) OnCarrierPrivilegedAppsChanged(
	ctx context.Context,
) error

func (*UsageStatsManagerProxy) QueryBroadcastResponseStats

func (p *UsageStatsManagerProxy) QueryBroadcastResponseStats(
	ctx context.Context,
	packageName string,
	id int64,
) (BroadcastResponseStatsList, error)

func (*UsageStatsManagerProxy) QueryConfigurationStats

func (p *UsageStatsManagerProxy) QueryConfigurationStats(
	ctx context.Context,
	bucketType int32,
	beginTime int64,
	endTime int64,
) (pm.ParceledListSlice, error)

func (*UsageStatsManagerProxy) QueryEventStats

func (p *UsageStatsManagerProxy) QueryEventStats(
	ctx context.Context,
	bucketType int32,
	beginTime int64,
	endTime int64,
) (pm.ParceledListSlice, error)

func (*UsageStatsManagerProxy) QueryEvents

func (p *UsageStatsManagerProxy) QueryEvents(
	ctx context.Context,
	beginTime int64,
	endTime int64,
) (UsageEvents, error)

func (*UsageStatsManagerProxy) QueryEventsForPackage

func (p *UsageStatsManagerProxy) QueryEventsForPackage(
	ctx context.Context,
	beginTime int64,
	endTime int64,
) (UsageEvents, error)

func (*UsageStatsManagerProxy) QueryEventsForPackageForUser

func (p *UsageStatsManagerProxy) QueryEventsForPackageForUser(
	ctx context.Context,
	beginTime int64,
	endTime int64,
	pkg string,
) (UsageEvents, error)

func (*UsageStatsManagerProxy) QueryEventsForUser

func (p *UsageStatsManagerProxy) QueryEventsForUser(
	ctx context.Context,
	beginTime int64,
	endTime int64,
) (UsageEvents, error)

func (*UsageStatsManagerProxy) QueryEventsWithFilter

func (p *UsageStatsManagerProxy) QueryEventsWithFilter(
	ctx context.Context,
	query UsageEventsQuery,
) (UsageEvents, error)

func (*UsageStatsManagerProxy) QueryUsageStats

func (p *UsageStatsManagerProxy) QueryUsageStats(
	ctx context.Context,
	bucketType int32,
	beginTime int64,
	endTime int64,
) (pm.ParceledListSlice, error)

func (*UsageStatsManagerProxy) RegisterAppUsageLimitObserver

func (p *UsageStatsManagerProxy) RegisterAppUsageLimitObserver(
	ctx context.Context,
	observerId int32,
	packages []string,
	timeLimitMs int64,
	timeUsedMs int64,
	callback app.PendingIntent,
) error

func (*UsageStatsManagerProxy) RegisterAppUsageObserver

func (p *UsageStatsManagerProxy) RegisterAppUsageObserver(
	ctx context.Context,
	observerId int32,
	packages []string,
	timeLimitMs int64,
	callback app.PendingIntent,
) error

func (*UsageStatsManagerProxy) RegisterUsageSessionObserver

func (p *UsageStatsManagerProxy) RegisterUsageSessionObserver(
	ctx context.Context,
	sessionObserverId int32,
	observed []string,
	timeLimitMs int64,
	sessionThresholdTimeMs int64,
	limitReachedCallbackIntent app.PendingIntent,
	sessionEndCallbackIntent app.PendingIntent,
) error

func (*UsageStatsManagerProxy) ReportChooserSelection

func (p *UsageStatsManagerProxy) ReportChooserSelection(
	ctx context.Context,
	packageName string,
	contentType string,
	annotations []string,
	action string,
) error

func (*UsageStatsManagerProxy) ReportPastUsageStart

func (p *UsageStatsManagerProxy) ReportPastUsageStart(
	ctx context.Context,
	activity binder.IBinder,
	token string,
	timeAgoMs int64,
) error

func (*UsageStatsManagerProxy) ReportUsageStart

func (p *UsageStatsManagerProxy) ReportUsageStart(
	ctx context.Context,
	activity binder.IBinder,
	token string,
) error

func (*UsageStatsManagerProxy) ReportUsageStop

func (p *UsageStatsManagerProxy) ReportUsageStop(
	ctx context.Context,
	activity binder.IBinder,
	token string,
) error

func (*UsageStatsManagerProxy) ReportUserInteraction

func (p *UsageStatsManagerProxy) ReportUserInteraction(
	ctx context.Context,
	packageName string,
) error

func (*UsageStatsManagerProxy) ReportUserInteractionWithBundle

func (p *UsageStatsManagerProxy) ReportUserInteractionWithBundle(
	ctx context.Context,
	packageName string,
	eventExtras os.PersistableBundle,
) error

func (*UsageStatsManagerProxy) SetAppInactive

func (p *UsageStatsManagerProxy) SetAppInactive(
	ctx context.Context,
	packageName string,
	inactive bool,
) error

func (*UsageStatsManagerProxy) SetAppStandbyBucket

func (p *UsageStatsManagerProxy) SetAppStandbyBucket(
	ctx context.Context,
	packageName string,
	bucket int32,
) error

func (*UsageStatsManagerProxy) SetAppStandbyBuckets

func (p *UsageStatsManagerProxy) SetAppStandbyBuckets(
	ctx context.Context,
	appBuckets pm.ParceledListSlice,
) error

func (*UsageStatsManagerProxy) SetEstimatedLaunchTime

func (p *UsageStatsManagerProxy) SetEstimatedLaunchTime(
	ctx context.Context,
	packageName string,
	estimatedLaunchTime int64,
) error

func (*UsageStatsManagerProxy) SetEstimatedLaunchTimes

func (p *UsageStatsManagerProxy) SetEstimatedLaunchTimes(
	ctx context.Context,
	appLaunchTimes pm.ParceledListSlice,
) error

func (*UsageStatsManagerProxy) UnregisterAppUsageLimitObserver

func (p *UsageStatsManagerProxy) UnregisterAppUsageLimitObserver(
	ctx context.Context,
	observerId int32,
) error

func (*UsageStatsManagerProxy) UnregisterAppUsageObserver

func (p *UsageStatsManagerProxy) UnregisterAppUsageObserver(
	ctx context.Context,
	observerId int32,
) error

func (*UsageStatsManagerProxy) UnregisterUsageSessionObserver

func (p *UsageStatsManagerProxy) UnregisterUsageSessionObserver(
	ctx context.Context,
	sessionObserverId int32,
) error

type UsageStatsManagerStub

type UsageStatsManagerStub struct {
	Impl      IUsageStatsManager
	Transport binder.VersionAwareTransport
}

UsageStatsManagerStub dispatches incoming binder transactions to a typed IUsageStatsManager implementation.

func (*UsageStatsManagerStub) Descriptor

func (s *UsageStatsManagerStub) Descriptor() string

func (*UsageStatsManagerStub) OnTransaction

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