storage

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 (
	TransactionIStorageEventListenerOnUsbMassStorageConnectionChanged = binder.FirstCallTransaction + 0
	TransactionIStorageEventListenerOnStorageStateChanged             = binder.FirstCallTransaction + 0
	TransactionIStorageEventListenerOnVolumeStateChanged              = binder.FirstCallTransaction + 1
	TransactionIStorageEventListenerOnVolumeRecordChanged             = binder.FirstCallTransaction + 2
	TransactionIStorageEventListenerOnVolumeForgotten                 = binder.FirstCallTransaction + 3
	TransactionIStorageEventListenerOnDiskScanned                     = binder.FirstCallTransaction + 4
	TransactionIStorageEventListenerOnDiskDestroyed                   = binder.FirstCallTransaction + 5
)
View Source
const (
	MethodIStorageEventListenerOnUsbMassStorageConnectionChanged = "onUsbMassStorageConnectionChanged"
	MethodIStorageEventListenerOnStorageStateChanged             = "onStorageStateChanged"
	MethodIStorageEventListenerOnVolumeStateChanged              = "onVolumeStateChanged"
	MethodIStorageEventListenerOnVolumeRecordChanged             = "onVolumeRecordChanged"
	MethodIStorageEventListenerOnVolumeForgotten                 = "onVolumeForgotten"
	MethodIStorageEventListenerOnDiskScanned                     = "onDiskScanned"
	MethodIStorageEventListenerOnDiskDestroyed                   = "onDiskDestroyed"
)
View Source
const (
	TransactionIStorageManagerRegisterListener                    = binder.FirstCallTransaction + 0
	TransactionIStorageManagerUnregisterListener                  = binder.FirstCallTransaction + 0
	TransactionIStorageManagerShutdown                            = binder.FirstCallTransaction + 18
	TransactionIStorageManagerMountObb                            = binder.FirstCallTransaction + 20
	TransactionIStorageManagerUnmountObb                          = binder.FirstCallTransaction + 21
	TransactionIStorageManagerIsObbMounted                        = binder.FirstCallTransaction + 22
	TransactionIStorageManagerGetMountedObbPath                   = binder.FirstCallTransaction + 23
	TransactionIStorageManagerGetVolumeList                       = binder.FirstCallTransaction + 28
	TransactionIStorageManagerMkdirs                              = binder.FirstCallTransaction + 33
	TransactionIStorageManagerLastMaintenance                     = binder.FirstCallTransaction + 40
	TransactionIStorageManagerRunMaintenance                      = binder.FirstCallTransaction + 41
	TransactionIStorageManagerGetDisks                            = binder.FirstCallTransaction + 43
	TransactionIStorageManagerGetVolumes                          = binder.FirstCallTransaction + 44
	TransactionIStorageManagerGetVolumeRecords                    = binder.FirstCallTransaction + 45
	TransactionIStorageManagerMount                               = binder.FirstCallTransaction + 46
	TransactionIStorageManagerUnmount                             = binder.FirstCallTransaction + 47
	TransactionIStorageManagerFormat                              = binder.FirstCallTransaction + 48
	TransactionIStorageManagerPartitionPublic                     = binder.FirstCallTransaction + 49
	TransactionIStorageManagerPartitionPrivate                    = binder.FirstCallTransaction + 50
	TransactionIStorageManagerPartitionMixed                      = binder.FirstCallTransaction + 51
	TransactionIStorageManagerSetVolumeNickname                   = binder.FirstCallTransaction + 52
	TransactionIStorageManagerSetVolumeUserFlags                  = binder.FirstCallTransaction + 53
	TransactionIStorageManagerForgetVolume                        = binder.FirstCallTransaction + 54
	TransactionIStorageManagerForgetAllVolumes                    = binder.FirstCallTransaction + 55
	TransactionIStorageManagerGetPrimaryStorageUuid               = binder.FirstCallTransaction + 56
	TransactionIStorageManagerSetPrimaryStorageUuid               = binder.FirstCallTransaction + 57
	TransactionIStorageManagerBenchmark                           = binder.FirstCallTransaction + 58
	TransactionIStorageManagerSetDebugFlags                       = binder.FirstCallTransaction + 59
	TransactionIStorageManagerCreateUserStorageKeys               = binder.FirstCallTransaction + 60
	TransactionIStorageManagerDestroyUserStorageKeys              = binder.FirstCallTransaction + 61
	TransactionIStorageManagerUnlockCeStorage                     = binder.FirstCallTransaction + 62
	TransactionIStorageManagerLockCeStorage                       = binder.FirstCallTransaction + 63
	TransactionIStorageManagerIsCeStorageUnlocked                 = binder.FirstCallTransaction + 64
	TransactionIStorageManagerPrepareUserStorage                  = binder.FirstCallTransaction + 65
	TransactionIStorageManagerDestroyUserStorage                  = binder.FirstCallTransaction + 66
	TransactionIStorageManagerSetCeStorageProtection              = binder.FirstCallTransaction + 69
	TransactionIStorageManagerFstrim                              = binder.FirstCallTransaction + 71
	TransactionIStorageManagerMountProxyFileDescriptorBridge      = binder.FirstCallTransaction + 72
	TransactionIStorageManagerOpenProxyFileDescriptor             = binder.FirstCallTransaction + 73
	TransactionIStorageManagerGetCacheQuotaBytes                  = binder.FirstCallTransaction + 74
	TransactionIStorageManagerGetCacheSizeBytes                   = binder.FirstCallTransaction + 75
	TransactionIStorageManagerGetAllocatableBytes                 = binder.FirstCallTransaction + 76
	TransactionIStorageManagerAllocateBytes                       = binder.FirstCallTransaction + 77
	TransactionIStorageManagerRunIdleMaintenance                  = binder.FirstCallTransaction + 78
	TransactionIStorageManagerAbortIdleMaintenance                = binder.FirstCallTransaction + 79
	TransactionIStorageManagerCommitChanges                       = binder.FirstCallTransaction + 82
	TransactionIStorageManagerSupportsCheckpoint                  = binder.FirstCallTransaction + 83
	TransactionIStorageManagerStartCheckpoint                     = binder.FirstCallTransaction + 84
	TransactionIStorageManagerNeedsCheckpoint                     = binder.FirstCallTransaction + 85
	TransactionIStorageManagerAbortChanges                        = binder.FirstCallTransaction + 86
	TransactionIStorageManagerFixupAppDir                         = binder.FirstCallTransaction + 88
	TransactionIStorageManagerDisableAppDataIsolation             = binder.FirstCallTransaction + 89
	TransactionIStorageManagerGetManageSpaceActivityIntent        = binder.FirstCallTransaction + 90
	TransactionIStorageManagerNotifyAppIoBlocked                  = binder.FirstCallTransaction + 91
	TransactionIStorageManagerNotifyAppIoResumed                  = binder.FirstCallTransaction + 92
	TransactionIStorageManagerGetExternalStorageMountMode         = binder.FirstCallTransaction + 93
	TransactionIStorageManagerIsAppIoBlocked                      = binder.FirstCallTransaction + 94
	TransactionIStorageManagerSetCloudMediaProvider               = binder.FirstCallTransaction + 95
	TransactionIStorageManagerGetCloudMediaProvider               = binder.FirstCallTransaction + 96
	TransactionIStorageManagerGetInternalStorageBlockDeviceSize   = binder.FirstCallTransaction + 97
	TransactionIStorageManagerGetInternalStorageRemainingLifetime = binder.FirstCallTransaction + 98
)
View Source
const (
	MethodIStorageManagerRegisterListener                    = "registerListener"
	MethodIStorageManagerUnregisterListener                  = "unregisterListener"
	MethodIStorageManagerShutdown                            = "shutdown"
	MethodIStorageManagerMountObb                            = "mountObb"
	MethodIStorageManagerUnmountObb                          = "unmountObb"
	MethodIStorageManagerIsObbMounted                        = "isObbMounted"
	MethodIStorageManagerGetMountedObbPath                   = "getMountedObbPath"
	MethodIStorageManagerGetVolumeList                       = "getVolumeList"
	MethodIStorageManagerMkdirs                              = "mkdirs"
	MethodIStorageManagerLastMaintenance                     = "lastMaintenance"
	MethodIStorageManagerRunMaintenance                      = "runMaintenance"
	MethodIStorageManagerGetDisks                            = "getDisks"
	MethodIStorageManagerGetVolumes                          = "getVolumes"
	MethodIStorageManagerGetVolumeRecords                    = "getVolumeRecords"
	MethodIStorageManagerMount                               = "mount"
	MethodIStorageManagerUnmount                             = "unmount"
	MethodIStorageManagerFormat                              = "format"
	MethodIStorageManagerPartitionPublic                     = "partitionPublic"
	MethodIStorageManagerPartitionPrivate                    = "partitionPrivate"
	MethodIStorageManagerPartitionMixed                      = "partitionMixed"
	MethodIStorageManagerSetVolumeNickname                   = "setVolumeNickname"
	MethodIStorageManagerSetVolumeUserFlags                  = "setVolumeUserFlags"
	MethodIStorageManagerForgetVolume                        = "forgetVolume"
	MethodIStorageManagerForgetAllVolumes                    = "forgetAllVolumes"
	MethodIStorageManagerGetPrimaryStorageUuid               = "getPrimaryStorageUuid"
	MethodIStorageManagerSetPrimaryStorageUuid               = "setPrimaryStorageUuid"
	MethodIStorageManagerBenchmark                           = "benchmark"
	MethodIStorageManagerSetDebugFlags                       = "setDebugFlags"
	MethodIStorageManagerCreateUserStorageKeys               = "createUserStorageKeys"
	MethodIStorageManagerDestroyUserStorageKeys              = "destroyUserStorageKeys"
	MethodIStorageManagerUnlockCeStorage                     = "unlockCeStorage"
	MethodIStorageManagerLockCeStorage                       = "lockCeStorage"
	MethodIStorageManagerIsCeStorageUnlocked                 = "isCeStorageUnlocked"
	MethodIStorageManagerPrepareUserStorage                  = "prepareUserStorage"
	MethodIStorageManagerDestroyUserStorage                  = "destroyUserStorage"
	MethodIStorageManagerSetCeStorageProtection              = "setCeStorageProtection"
	MethodIStorageManagerFstrim                              = "fstrim"
	MethodIStorageManagerMountProxyFileDescriptorBridge      = "mountProxyFileDescriptorBridge"
	MethodIStorageManagerOpenProxyFileDescriptor             = "openProxyFileDescriptor"
	MethodIStorageManagerGetCacheQuotaBytes                  = "getCacheQuotaBytes"
	MethodIStorageManagerGetCacheSizeBytes                   = "getCacheSizeBytes"
	MethodIStorageManagerGetAllocatableBytes                 = "getAllocatableBytes"
	MethodIStorageManagerAllocateBytes                       = "allocateBytes"
	MethodIStorageManagerRunIdleMaintenance                  = "runIdleMaintenance"
	MethodIStorageManagerAbortIdleMaintenance                = "abortIdleMaintenance"
	MethodIStorageManagerCommitChanges                       = "commitChanges"
	MethodIStorageManagerSupportsCheckpoint                  = "supportsCheckpoint"
	MethodIStorageManagerStartCheckpoint                     = "startCheckpoint"
	MethodIStorageManagerNeedsCheckpoint                     = "needsCheckpoint"
	MethodIStorageManagerAbortChanges                        = "abortChanges"
	MethodIStorageManagerFixupAppDir                         = "fixupAppDir"
	MethodIStorageManagerDisableAppDataIsolation             = "disableAppDataIsolation"
	MethodIStorageManagerGetManageSpaceActivityIntent        = "getManageSpaceActivityIntent"
	MethodIStorageManagerNotifyAppIoBlocked                  = "notifyAppIoBlocked"
	MethodIStorageManagerNotifyAppIoResumed                  = "notifyAppIoResumed"
	MethodIStorageManagerGetExternalStorageMountMode         = "getExternalStorageMountMode"
	MethodIStorageManagerIsAppIoBlocked                      = "isAppIoBlocked"
	MethodIStorageManagerSetCloudMediaProvider               = "setCloudMediaProvider"
	MethodIStorageManagerGetCloudMediaProvider               = "getCloudMediaProvider"
	MethodIStorageManagerGetInternalStorageBlockDeviceSize   = "getInternalStorageBlockDeviceSize"
	MethodIStorageManagerGetInternalStorageRemainingLifetime = "getInternalStorageRemainingLifetime"
)
View Source
const DescriptorIObbActionListener = "android.os.storage.IObbActionListener"
View Source
const DescriptorIStorageEventListener = "android.os.storage.IStorageEventListener"
View Source
const DescriptorIStorageManager = "android.os.storage.IStorageManager"
View Source
const DescriptorIStorageShutdownObserver = "android.os.storage.IStorageShutdownObserver"
View Source
const (
	MethodIObbActionListenerOnObbResult = "onObbResult"
)
View Source
const (
	MethodIStorageShutdownObserverOnShutDownComplete = "onShutDownComplete"
)
View Source
const (
	TransactionIObbActionListenerOnObbResult = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIStorageShutdownObserverOnShutDownComplete = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CrateInfo

type CrateInfo struct {
	Expiration  int64
	Uid         int32
	PackageName string
	Id          string
}

func (*CrateInfo) MarshalParcel

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

func (*CrateInfo) UnmarshalParcel

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

type CrateMetadata

type CrateMetadata struct {
	Uid         int32
	PackageName string
	Id          string
}

func (*CrateMetadata) MarshalParcel

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

func (*CrateMetadata) UnmarshalParcel

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

type DiskInfo

type DiskInfo struct {
	Id          string
	Size        int64
	Label       string
	VolumeCount int32
	SysPath     string
}

func (*DiskInfo) MarshalParcel

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

func (*DiskInfo) UnmarshalParcel

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

type IObbActionListener

type IObbActionListener interface {
	AsBinder() binder.IBinder
	OnObbResult(ctx context.Context, filename string, nonce int32, status int32) error
}

func NewObbActionListenerStub

func NewObbActionListenerStub(
	impl IObbActionListenerServer,
) IObbActionListener

NewObbActionListenerStub creates a server-side IObbActionListener wrapping the given server implementation. The returned value satisfies IObbActionListener 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 IObbActionListenerServer

type IObbActionListenerServer interface {
	OnObbResult(ctx context.Context, filename string, nonce int32, status int32) error
}

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

type IStorageEventListener

type IStorageEventListener interface {
	AsBinder() binder.IBinder
	OnUsbMassStorageConnectionChanged(ctx context.Context, connected bool) error
	OnStorageStateChanged(ctx context.Context, path string, oldState string, newState string) error
	OnVolumeStateChanged(ctx context.Context, vol VolumeInfo, oldState int32, newState int32) error
	OnVolumeRecordChanged(ctx context.Context, rec VolumeRecord) error
	OnVolumeForgotten(ctx context.Context, fsUuid string) error
	OnDiskScanned(ctx context.Context, disk DiskInfo, volumeCount int32) error
	OnDiskDestroyed(ctx context.Context, disk DiskInfo) error
}

func NewStorageEventListenerStub

func NewStorageEventListenerStub(
	impl IStorageEventListenerServer,
) IStorageEventListener

NewStorageEventListenerStub creates a server-side IStorageEventListener wrapping the given server implementation. The returned value satisfies IStorageEventListener 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 IStorageEventListenerServer

type IStorageEventListenerServer interface {
	OnUsbMassStorageConnectionChanged(ctx context.Context, connected bool) error
	OnStorageStateChanged(ctx context.Context, path string, oldState string, newState string) error
	OnVolumeStateChanged(ctx context.Context, vol VolumeInfo, oldState int32, newState int32) error
	OnVolumeRecordChanged(ctx context.Context, rec VolumeRecord) error
	OnVolumeForgotten(ctx context.Context, fsUuid string) error
	OnDiskScanned(ctx context.Context, disk DiskInfo, volumeCount int32) error
	OnDiskDestroyed(ctx context.Context, disk DiskInfo) error
}

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

type IStorageManager

type IStorageManager interface {
	AsBinder() binder.IBinder
	RegisterListener(ctx context.Context, listener IStorageEventListener) error
	UnregisterListener(ctx context.Context, listener IStorageEventListener) error
	Shutdown(ctx context.Context, observer IStorageShutdownObserver) error
	MountObb(ctx context.Context, rawPath string, canonicalPath string, token IObbActionListener, nonce int32, obbInfo res.ObbInfo) error
	UnmountObb(ctx context.Context, rawPath string, force bool, token IObbActionListener, nonce int32) error
	IsObbMounted(ctx context.Context, rawPath string) (bool, error)
	GetMountedObbPath(ctx context.Context, rawPath string) (string, error)
	GetVolumeList(ctx context.Context, flags int32) ([]StorageVolume, error)
	Mkdirs(ctx context.Context, callingPkg string, path string) error
	LastMaintenance(ctx context.Context) (int64, error)
	RunMaintenance(ctx context.Context) error
	GetDisks(ctx context.Context) ([]DiskInfo, error)
	GetVolumes(ctx context.Context, flags int32) ([]VolumeInfo, error)
	GetVolumeRecords(ctx context.Context, flags int32) ([]VolumeRecord, error)
	Mount(ctx context.Context, volId string) error
	Unmount(ctx context.Context, volId string) error
	Format(ctx context.Context, volId string) error
	PartitionPublic(ctx context.Context, diskId string) error
	PartitionPrivate(ctx context.Context, diskId string) error
	PartitionMixed(ctx context.Context, diskId string, ratio int32) error
	SetVolumeNickname(ctx context.Context, fsUuid string, nickname string) error
	SetVolumeUserFlags(ctx context.Context, fsUuid string, flags int32, mask int32) error
	ForgetVolume(ctx context.Context, fsUuid string) error
	ForgetAllVolumes(ctx context.Context) error
	GetPrimaryStorageUuid(ctx context.Context) (string, error)
	SetPrimaryStorageUuid(ctx context.Context, volumeUuid string, callback types.IPackageMoveObserver) error
	Benchmark(ctx context.Context, volId string, listener any) error
	SetDebugFlags(ctx context.Context, flags int32, mask int32) error
	CreateUserStorageKeys(ctx context.Context, ephemeral bool) error
	DestroyUserStorageKeys(ctx context.Context) error
	UnlockCeStorage(ctx context.Context, secret []byte) error
	LockCeStorage(ctx context.Context) error
	IsCeStorageUnlocked(ctx context.Context) (bool, error)
	PrepareUserStorage(ctx context.Context, volumeUuid string, flags int32) error
	DestroyUserStorage(ctx context.Context, volumeUuid string, flags int32) error
	SetCeStorageProtection(ctx context.Context, secret []byte) error
	Fstrim(ctx context.Context, flags int32, listener any) error
	MountProxyFileDescriptorBridge(ctx context.Context) (os.AppFuseMount, error)
	OpenProxyFileDescriptor(ctx context.Context, mountPointId int32, fileId int32, mode int32) (int32, error)
	GetCacheQuotaBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
	GetCacheSizeBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
	GetAllocatableBytes(ctx context.Context, volumeUuid string, flags int32) (int64, error)
	AllocateBytes(ctx context.Context, volumeUuid string, bytes int64, flags int32) error
	RunIdleMaintenance(ctx context.Context) error
	AbortIdleMaintenance(ctx context.Context) error
	CommitChanges(ctx context.Context) error
	SupportsCheckpoint(ctx context.Context) (bool, error)
	StartCheckpoint(ctx context.Context, numTries int32) error
	NeedsCheckpoint(ctx context.Context) (bool, error)
	AbortChanges(ctx context.Context, message string, retry bool) error
	FixupAppDir(ctx context.Context, path string) error
	DisableAppDataIsolation(ctx context.Context, pkgName string, pid int32) error
	GetManageSpaceActivityIntent(ctx context.Context, packageName string, requestCode int32) (appTypes.PendingIntent, error)
	NotifyAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
	NotifyAppIoResumed(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
	GetExternalStorageMountMode(ctx context.Context, uid int32, packageName string) (int32, error)
	IsAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) (bool, error)
	SetCloudMediaProvider(ctx context.Context, authority string) error
	GetCloudMediaProvider(ctx context.Context) (string, error)
	GetInternalStorageBlockDeviceSize(ctx context.Context) (int64, error)
	GetInternalStorageRemainingLifetime(ctx context.Context) (int32, error)
}

func NewStorageManagerStub

func NewStorageManagerStub(
	impl IStorageManagerServer,
) IStorageManager

NewStorageManagerStub creates a server-side IStorageManager wrapping the given server implementation. The returned value satisfies IStorageManager 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 IStorageManagerServer

type IStorageManagerServer interface {
	RegisterListener(ctx context.Context, listener IStorageEventListener) error
	UnregisterListener(ctx context.Context, listener IStorageEventListener) error
	Shutdown(ctx context.Context, observer IStorageShutdownObserver) error
	MountObb(ctx context.Context, rawPath string, canonicalPath string, token IObbActionListener, nonce int32, obbInfo res.ObbInfo) error
	UnmountObb(ctx context.Context, rawPath string, force bool, token IObbActionListener, nonce int32) error
	IsObbMounted(ctx context.Context, rawPath string) (bool, error)
	GetMountedObbPath(ctx context.Context, rawPath string) (string, error)
	GetVolumeList(ctx context.Context, flags int32) ([]StorageVolume, error)
	Mkdirs(ctx context.Context, callingPkg string, path string) error
	LastMaintenance(ctx context.Context) (int64, error)
	RunMaintenance(ctx context.Context) error
	GetDisks(ctx context.Context) ([]DiskInfo, error)
	GetVolumes(ctx context.Context, flags int32) ([]VolumeInfo, error)
	GetVolumeRecords(ctx context.Context, flags int32) ([]VolumeRecord, error)
	Mount(ctx context.Context, volId string) error
	Unmount(ctx context.Context, volId string) error
	Format(ctx context.Context, volId string) error
	PartitionPublic(ctx context.Context, diskId string) error
	PartitionPrivate(ctx context.Context, diskId string) error
	PartitionMixed(ctx context.Context, diskId string, ratio int32) error
	SetVolumeNickname(ctx context.Context, fsUuid string, nickname string) error
	SetVolumeUserFlags(ctx context.Context, fsUuid string, flags int32, mask int32) error
	ForgetVolume(ctx context.Context, fsUuid string) error
	ForgetAllVolumes(ctx context.Context) error
	GetPrimaryStorageUuid(ctx context.Context) (string, error)
	SetPrimaryStorageUuid(ctx context.Context, volumeUuid string, callback types.IPackageMoveObserver) error
	Benchmark(ctx context.Context, volId string, listener any) error
	SetDebugFlags(ctx context.Context, flags int32, mask int32) error
	CreateUserStorageKeys(ctx context.Context, ephemeral bool) error
	DestroyUserStorageKeys(ctx context.Context) error
	UnlockCeStorage(ctx context.Context, secret []byte) error
	LockCeStorage(ctx context.Context) error
	IsCeStorageUnlocked(ctx context.Context) (bool, error)
	PrepareUserStorage(ctx context.Context, volumeUuid string, flags int32) error
	DestroyUserStorage(ctx context.Context, volumeUuid string, flags int32) error
	SetCeStorageProtection(ctx context.Context, secret []byte) error
	Fstrim(ctx context.Context, flags int32, listener any) error
	MountProxyFileDescriptorBridge(ctx context.Context) (os.AppFuseMount, error)
	OpenProxyFileDescriptor(ctx context.Context, mountPointId int32, fileId int32, mode int32) (int32, error)
	GetCacheQuotaBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
	GetCacheSizeBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
	GetAllocatableBytes(ctx context.Context, volumeUuid string, flags int32) (int64, error)
	AllocateBytes(ctx context.Context, volumeUuid string, bytes int64, flags int32) error
	RunIdleMaintenance(ctx context.Context) error
	AbortIdleMaintenance(ctx context.Context) error
	CommitChanges(ctx context.Context) error
	SupportsCheckpoint(ctx context.Context) (bool, error)
	StartCheckpoint(ctx context.Context, numTries int32) error
	NeedsCheckpoint(ctx context.Context) (bool, error)
	AbortChanges(ctx context.Context, message string, retry bool) error
	FixupAppDir(ctx context.Context, path string) error
	DisableAppDataIsolation(ctx context.Context, pkgName string, pid int32) error
	GetManageSpaceActivityIntent(ctx context.Context, packageName string, requestCode int32) (appTypes.PendingIntent, error)
	NotifyAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
	NotifyAppIoResumed(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
	GetExternalStorageMountMode(ctx context.Context, uid int32, packageName string) (int32, error)
	IsAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) (bool, error)
	SetCloudMediaProvider(ctx context.Context, authority string) error
	GetCloudMediaProvider(ctx context.Context) (string, error)
	GetInternalStorageBlockDeviceSize(ctx context.Context) (int64, error)
	GetInternalStorageRemainingLifetime(ctx context.Context) (int32, error)
}

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

type IStorageShutdownObserver

type IStorageShutdownObserver interface {
	AsBinder() binder.IBinder
	OnShutDownComplete(ctx context.Context, statusCode int32) error
}

func NewStorageShutdownObserverStub

func NewStorageShutdownObserverStub(
	impl IStorageShutdownObserverServer,
) IStorageShutdownObserver

NewStorageShutdownObserverStub creates a server-side IStorageShutdownObserver wrapping the given server implementation. The returned value satisfies IStorageShutdownObserver 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 IStorageShutdownObserverServer

type IStorageShutdownObserverServer interface {
	OnShutDownComplete(ctx context.Context, statusCode int32) error
}

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

type ObbActionListenerProxy

type ObbActionListenerProxy struct {
	Remote binder.IBinder
}

func NewObbActionListenerProxy

func NewObbActionListenerProxy(
	remote binder.IBinder,
) *ObbActionListenerProxy

func (*ObbActionListenerProxy) AsBinder

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

func (*ObbActionListenerProxy) OnObbResult

func (p *ObbActionListenerProxy) OnObbResult(
	ctx context.Context,
	filename string,
	nonce int32,
	status int32,
) error

type ObbActionListenerStub

type ObbActionListenerStub struct {
	Impl      IObbActionListener
	Transport binder.VersionAwareTransport
}

ObbActionListenerStub dispatches incoming binder transactions to a typed IObbActionListener implementation.

func (*ObbActionListenerStub) Descriptor

func (s *ObbActionListenerStub) Descriptor() string

func (*ObbActionListenerStub) OnTransaction

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

type StorageEventListenerProxy

type StorageEventListenerProxy struct {
	Remote binder.IBinder
}

func NewStorageEventListenerProxy

func NewStorageEventListenerProxy(
	remote binder.IBinder,
) *StorageEventListenerProxy

func (*StorageEventListenerProxy) AsBinder

func (*StorageEventListenerProxy) OnDiskDestroyed

func (p *StorageEventListenerProxy) OnDiskDestroyed(
	ctx context.Context,
	disk DiskInfo,
) error

func (*StorageEventListenerProxy) OnDiskScanned

func (p *StorageEventListenerProxy) OnDiskScanned(
	ctx context.Context,
	disk DiskInfo,
	volumeCount int32,
) error

func (*StorageEventListenerProxy) OnStorageStateChanged

func (p *StorageEventListenerProxy) OnStorageStateChanged(
	ctx context.Context,
	path string,
	oldState string,
	newState string,
) error

func (*StorageEventListenerProxy) OnUsbMassStorageConnectionChanged

func (p *StorageEventListenerProxy) OnUsbMassStorageConnectionChanged(
	ctx context.Context,
	connected bool,
) error

func (*StorageEventListenerProxy) OnVolumeForgotten

func (p *StorageEventListenerProxy) OnVolumeForgotten(
	ctx context.Context,
	fsUuid string,
) error

func (*StorageEventListenerProxy) OnVolumeRecordChanged

func (p *StorageEventListenerProxy) OnVolumeRecordChanged(
	ctx context.Context,
	rec VolumeRecord,
) error

func (*StorageEventListenerProxy) OnVolumeStateChanged

func (p *StorageEventListenerProxy) OnVolumeStateChanged(
	ctx context.Context,
	vol VolumeInfo,
	oldState int32,
	newState int32,
) error

type StorageEventListenerStub

type StorageEventListenerStub struct {
	Impl      IStorageEventListener
	Transport binder.VersionAwareTransport
}

StorageEventListenerStub dispatches incoming binder transactions to a typed IStorageEventListener implementation.

func (*StorageEventListenerStub) Descriptor

func (s *StorageEventListenerStub) Descriptor() string

func (*StorageEventListenerStub) OnTransaction

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

type StorageManagerProxy

type StorageManagerProxy struct {
	Remote binder.IBinder
}

func NewStorageManagerProxy

func NewStorageManagerProxy(
	remote binder.IBinder,
) *StorageManagerProxy

func (*StorageManagerProxy) AbortChanges

func (p *StorageManagerProxy) AbortChanges(
	ctx context.Context,
	message string,
	retry bool,
) error

func (*StorageManagerProxy) AbortIdleMaintenance

func (p *StorageManagerProxy) AbortIdleMaintenance(
	ctx context.Context,
) error

func (*StorageManagerProxy) AllocateBytes

func (p *StorageManagerProxy) AllocateBytes(
	ctx context.Context,
	volumeUuid string,
	bytes int64,
	flags int32,
) error

func (*StorageManagerProxy) AsBinder

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

func (*StorageManagerProxy) Benchmark

func (p *StorageManagerProxy) Benchmark(
	ctx context.Context,
	volId string,
	listener any,
) error

func (*StorageManagerProxy) CommitChanges

func (p *StorageManagerProxy) CommitChanges(
	ctx context.Context,
) error

func (*StorageManagerProxy) CreateUserStorageKeys

func (p *StorageManagerProxy) CreateUserStorageKeys(
	ctx context.Context,
	ephemeral bool,
) error

func (*StorageManagerProxy) DestroyUserStorage

func (p *StorageManagerProxy) DestroyUserStorage(
	ctx context.Context,
	volumeUuid string,
	flags int32,
) error

func (*StorageManagerProxy) DestroyUserStorageKeys

func (p *StorageManagerProxy) DestroyUserStorageKeys(
	ctx context.Context,
) error

func (*StorageManagerProxy) DisableAppDataIsolation

func (p *StorageManagerProxy) DisableAppDataIsolation(
	ctx context.Context,
	pkgName string,
	pid int32,
) error

func (*StorageManagerProxy) FixupAppDir

func (p *StorageManagerProxy) FixupAppDir(
	ctx context.Context,
	path string,
) error

func (*StorageManagerProxy) ForgetAllVolumes

func (p *StorageManagerProxy) ForgetAllVolumes(
	ctx context.Context,
) error

func (*StorageManagerProxy) ForgetVolume

func (p *StorageManagerProxy) ForgetVolume(
	ctx context.Context,
	fsUuid string,
) error

func (*StorageManagerProxy) Format

func (p *StorageManagerProxy) Format(
	ctx context.Context,
	volId string,
) error

func (*StorageManagerProxy) Fstrim

func (p *StorageManagerProxy) Fstrim(
	ctx context.Context,
	flags int32,
	listener any,
) error

func (*StorageManagerProxy) GetAllocatableBytes

func (p *StorageManagerProxy) GetAllocatableBytes(
	ctx context.Context,
	volumeUuid string,
	flags int32,
) (int64, error)

func (*StorageManagerProxy) GetCacheQuotaBytes

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

func (*StorageManagerProxy) GetCacheSizeBytes

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

func (*StorageManagerProxy) GetCloudMediaProvider

func (p *StorageManagerProxy) GetCloudMediaProvider(
	ctx context.Context,
) (string, error)

func (*StorageManagerProxy) GetDisks

func (p *StorageManagerProxy) GetDisks(
	ctx context.Context,
) ([]DiskInfo, error)

func (*StorageManagerProxy) GetExternalStorageMountMode

func (p *StorageManagerProxy) GetExternalStorageMountMode(
	ctx context.Context,
	uid int32,
	packageName string,
) (int32, error)

func (*StorageManagerProxy) GetInternalStorageBlockDeviceSize

func (p *StorageManagerProxy) GetInternalStorageBlockDeviceSize(
	ctx context.Context,
) (int64, error)

func (*StorageManagerProxy) GetInternalStorageRemainingLifetime

func (p *StorageManagerProxy) GetInternalStorageRemainingLifetime(
	ctx context.Context,
) (int32, error)

func (*StorageManagerProxy) GetManageSpaceActivityIntent

func (p *StorageManagerProxy) GetManageSpaceActivityIntent(
	ctx context.Context,
	packageName string,
	requestCode int32,
) (appTypes.PendingIntent, error)

func (*StorageManagerProxy) GetMountedObbPath

func (p *StorageManagerProxy) GetMountedObbPath(
	ctx context.Context,
	rawPath string,
) (string, error)

func (*StorageManagerProxy) GetPrimaryStorageUuid

func (p *StorageManagerProxy) GetPrimaryStorageUuid(
	ctx context.Context,
) (string, error)

func (*StorageManagerProxy) GetVolumeList

func (p *StorageManagerProxy) GetVolumeList(
	ctx context.Context,
	flags int32,
) ([]StorageVolume, error)

func (*StorageManagerProxy) GetVolumeRecords

func (p *StorageManagerProxy) GetVolumeRecords(
	ctx context.Context,
	flags int32,
) ([]VolumeRecord, error)

func (*StorageManagerProxy) GetVolumes

func (p *StorageManagerProxy) GetVolumes(
	ctx context.Context,
	flags int32,
) ([]VolumeInfo, error)

func (*StorageManagerProxy) IsAppIoBlocked

func (p *StorageManagerProxy) IsAppIoBlocked(
	ctx context.Context,
	volumeUuid string,
	uid int32,
	tid int32,
	reason int32,
) (bool, error)

func (*StorageManagerProxy) IsCeStorageUnlocked

func (p *StorageManagerProxy) IsCeStorageUnlocked(
	ctx context.Context,
) (bool, error)

func (*StorageManagerProxy) IsObbMounted

func (p *StorageManagerProxy) IsObbMounted(
	ctx context.Context,
	rawPath string,
) (bool, error)

func (*StorageManagerProxy) LastMaintenance

func (p *StorageManagerProxy) LastMaintenance(
	ctx context.Context,
) (int64, error)

func (*StorageManagerProxy) LockCeStorage

func (p *StorageManagerProxy) LockCeStorage(
	ctx context.Context,
) error

func (*StorageManagerProxy) Mkdirs

func (p *StorageManagerProxy) Mkdirs(
	ctx context.Context,
	callingPkg string,
	path string,
) error

func (*StorageManagerProxy) Mount

func (p *StorageManagerProxy) Mount(
	ctx context.Context,
	volId string,
) error

func (*StorageManagerProxy) MountObb

func (p *StorageManagerProxy) MountObb(
	ctx context.Context,
	rawPath string,
	canonicalPath string,
	token IObbActionListener,
	nonce int32,
	obbInfo res.ObbInfo,
) error

func (*StorageManagerProxy) MountProxyFileDescriptorBridge

func (p *StorageManagerProxy) MountProxyFileDescriptorBridge(
	ctx context.Context,
) (os.AppFuseMount, error)

func (*StorageManagerProxy) NeedsCheckpoint

func (p *StorageManagerProxy) NeedsCheckpoint(
	ctx context.Context,
) (bool, error)

func (*StorageManagerProxy) NotifyAppIoBlocked

func (p *StorageManagerProxy) NotifyAppIoBlocked(
	ctx context.Context,
	volumeUuid string,
	uid int32,
	tid int32,
	reason int32,
) error

func (*StorageManagerProxy) NotifyAppIoResumed

func (p *StorageManagerProxy) NotifyAppIoResumed(
	ctx context.Context,
	volumeUuid string,
	uid int32,
	tid int32,
	reason int32,
) error

func (*StorageManagerProxy) OpenProxyFileDescriptor

func (p *StorageManagerProxy) OpenProxyFileDescriptor(
	ctx context.Context,
	mountPointId int32,
	fileId int32,
	mode int32,
) (int32, error)

func (*StorageManagerProxy) PartitionMixed

func (p *StorageManagerProxy) PartitionMixed(
	ctx context.Context,
	diskId string,
	ratio int32,
) error

func (*StorageManagerProxy) PartitionPrivate

func (p *StorageManagerProxy) PartitionPrivate(
	ctx context.Context,
	diskId string,
) error

func (*StorageManagerProxy) PartitionPublic

func (p *StorageManagerProxy) PartitionPublic(
	ctx context.Context,
	diskId string,
) error

func (*StorageManagerProxy) PrepareUserStorage

func (p *StorageManagerProxy) PrepareUserStorage(
	ctx context.Context,
	volumeUuid string,
	flags int32,
) error

func (*StorageManagerProxy) RegisterListener

func (p *StorageManagerProxy) RegisterListener(
	ctx context.Context,
	listener IStorageEventListener,
) error

func (*StorageManagerProxy) RunIdleMaintenance

func (p *StorageManagerProxy) RunIdleMaintenance(
	ctx context.Context,
) error

func (*StorageManagerProxy) RunMaintenance

func (p *StorageManagerProxy) RunMaintenance(
	ctx context.Context,
) error

func (*StorageManagerProxy) SetCeStorageProtection

func (p *StorageManagerProxy) SetCeStorageProtection(
	ctx context.Context,
	secret []byte,
) error

func (*StorageManagerProxy) SetCloudMediaProvider

func (p *StorageManagerProxy) SetCloudMediaProvider(
	ctx context.Context,
	authority string,
) error

func (*StorageManagerProxy) SetDebugFlags

func (p *StorageManagerProxy) SetDebugFlags(
	ctx context.Context,
	flags int32,
	mask int32,
) error

func (*StorageManagerProxy) SetPrimaryStorageUuid

func (p *StorageManagerProxy) SetPrimaryStorageUuid(
	ctx context.Context,
	volumeUuid string,
	callback types.IPackageMoveObserver,
) error

func (*StorageManagerProxy) SetVolumeNickname

func (p *StorageManagerProxy) SetVolumeNickname(
	ctx context.Context,
	fsUuid string,
	nickname string,
) error

func (*StorageManagerProxy) SetVolumeUserFlags

func (p *StorageManagerProxy) SetVolumeUserFlags(
	ctx context.Context,
	fsUuid string,
	flags int32,
	mask int32,
) error

func (*StorageManagerProxy) Shutdown

func (p *StorageManagerProxy) Shutdown(
	ctx context.Context,
	observer IStorageShutdownObserver,
) error

func (*StorageManagerProxy) StartCheckpoint

func (p *StorageManagerProxy) StartCheckpoint(
	ctx context.Context,
	numTries int32,
) error

func (*StorageManagerProxy) SupportsCheckpoint

func (p *StorageManagerProxy) SupportsCheckpoint(
	ctx context.Context,
) (bool, error)

func (*StorageManagerProxy) UnlockCeStorage

func (p *StorageManagerProxy) UnlockCeStorage(
	ctx context.Context,
	secret []byte,
) error

func (*StorageManagerProxy) Unmount

func (p *StorageManagerProxy) Unmount(
	ctx context.Context,
	volId string,
) error

func (*StorageManagerProxy) UnmountObb

func (p *StorageManagerProxy) UnmountObb(
	ctx context.Context,
	rawPath string,
	force bool,
	token IObbActionListener,
	nonce int32,
) error

func (*StorageManagerProxy) UnregisterListener

func (p *StorageManagerProxy) UnregisterListener(
	ctx context.Context,
	listener IStorageEventListener,
) error

type StorageManagerStub

type StorageManagerStub struct {
	Impl      IStorageManager
	Transport binder.VersionAwareTransport
}

StorageManagerStub dispatches incoming binder transactions to a typed IStorageManager implementation.

func (*StorageManagerStub) Descriptor

func (s *StorageManagerStub) Descriptor() string

func (*StorageManagerStub) OnTransaction

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

type StorageShutdownObserverProxy

type StorageShutdownObserverProxy struct {
	Remote binder.IBinder
}

func NewStorageShutdownObserverProxy

func NewStorageShutdownObserverProxy(
	remote binder.IBinder,
) *StorageShutdownObserverProxy

func (*StorageShutdownObserverProxy) AsBinder

func (*StorageShutdownObserverProxy) OnShutDownComplete

func (p *StorageShutdownObserverProxy) OnShutDownComplete(
	ctx context.Context,
	statusCode int32,
) error

type StorageShutdownObserverStub

type StorageShutdownObserverStub struct {
	Impl      IStorageShutdownObserver
	Transport binder.VersionAwareTransport
}

StorageShutdownObserverStub dispatches incoming binder transactions to a typed IStorageShutdownObserver implementation.

func (*StorageShutdownObserverStub) Descriptor

func (s *StorageShutdownObserverStub) Descriptor() string

func (*StorageShutdownObserverStub) OnTransaction

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

type StorageVolume

type StorageVolume struct {
	Id          string
	Description string
	MaxFileSize int64
	FsUuid      string
	State       string
}

func (*StorageVolume) MarshalParcel

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

func (*StorageVolume) UnmarshalParcel

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

type VolumeInfo

type VolumeInfo struct {
	Id           string
	Type         int32
	PartGuid     string
	MountFlags   int32
	MountUserId  int32
	State        int32
	FsType       string
	FsUuid       string
	FsLabel      string
	Path         string
	InternalPath string
}

func (*VolumeInfo) MarshalParcel

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

func (*VolumeInfo) UnmarshalParcel

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

type VolumeRecord

type VolumeRecord struct {
	Type            int32
	FsUuid          string
	PartGuid        string
	Nickname        string
	UserFlags       int32
	CreatedMillis   int64
	LastSeenMillis  int64
	LastTrimMillis  int64
	LastBenchMillis int64
}

func (*VolumeRecord) MarshalParcel

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

func (*VolumeRecord) UnmarshalParcel

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

Jump to

Keyboard shortcuts

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