Documentation
¶
Index ¶
- Constants
- type AltModeData
- type AltModeDataDisplayPortAltModeData
- type ComplianceWarning
- type ContaminantDetectionStatus
- type ContaminantProtectionMode
- type ContaminantProtectionStatus
- type DisplayPortAltModeInfo
- type DisplayPortAltModeInfoListenerProxy
- type DisplayPortAltModeInfoListenerStub
- type DisplayPortAltModePinAssignment
- type DisplayPortAltModeStatus
- type IDisplayPortAltModeInfoListener
- type IDisplayPortAltModeInfoListenerServer
- type IUsb
- type IUsbCallback
- type IUsbCallbackServer
- type IUsbManager
- type IUsbManagerServer
- type IUsbOperationInternal
- type IUsbOperationInternalServer
- type IUsbSerialReader
- type IUsbSerialReaderServer
- type IUsbServer
- type LinkTrainingStatus
- type ParcelableUsbPort
- type PlugOrientation
- type PortDataRole
- type PortMode
- type PortPowerRole
- type PortRole
- func (u *PortRole) GetDataRole() (PortDataRole, bool)
- func (u *PortRole) GetMode() (PortMode, bool)
- func (u *PortRole) GetPowerRole() (PortPowerRole, bool)
- func (u *PortRole) MarshalParcel(p *parcel.Parcel) error
- func (u *PortRole) SetDataRole(v PortDataRole)
- func (u *PortRole) SetMode(v PortMode)
- func (u *PortRole) SetPowerRole(v PortPowerRole)
- func (u *PortRole) UnmarshalParcel(p *parcel.Parcel) error
- type PortStatus
- type PowerBrickStatus
- type Status
- type UsbAccessory
- type UsbCallbackProxy
- func (p *UsbCallbackProxy) AsBinder() binder.IBinder
- func (p *UsbCallbackProxy) NotifyContaminantEnabledStatus(ctx context.Context, portName string, enable bool, retval Status, ...) error
- func (p *UsbCallbackProxy) NotifyEnableUsbDataStatus(ctx context.Context, portName string, enable bool, retval Status, ...) error
- func (p *UsbCallbackProxy) NotifyEnableUsbDataWhileDockedStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
- func (p *UsbCallbackProxy) NotifyLimitPowerTransferStatus(ctx context.Context, portName string, limit bool, retval Status, ...) error
- func (p *UsbCallbackProxy) NotifyPortStatusChange(ctx context.Context, currentPortStatus []PortStatus, retval Status) error
- func (p *UsbCallbackProxy) NotifyQueryPortStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
- func (p *UsbCallbackProxy) NotifyResetUsbPortStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
- func (p *UsbCallbackProxy) NotifyRoleSwitchStatus(ctx context.Context, portName string, newRole PortRole, retval Status, ...) error
- type UsbCallbackStub
- type UsbDataStatus
- type UsbDevice
- type UsbEndpoint
- type UsbInterface
- type UsbManagerProxy
- func (p *UsbManagerProxy) AddAccessoryPackagesToPreferenceDenied(ctx context.Context, accessory UsbAccessory, packageNames []string, ...) error
- func (p *UsbManagerProxy) AddDevicePackagesToPreferenceDenied(ctx context.Context, device UsbDevice, packageNames []string, ...) error
- func (p *UsbManagerProxy) AsBinder() binder.IBinder
- func (p *UsbManagerProxy) ClearDefaults(ctx context.Context, packageName string) error
- func (p *UsbManagerProxy) EnableContaminantDetection(ctx context.Context, portId string, enable bool) error
- func (p *UsbManagerProxy) EnableLimitPowerTransfer(ctx context.Context, portId string, limit bool, operationId int32, ...) error
- func (p *UsbManagerProxy) EnableUsbData(ctx context.Context, portId string, enable bool, operationId int32, ...) (bool, error)
- func (p *UsbManagerProxy) EnableUsbDataWhileDocked(ctx context.Context, portId string, operationId int32, ...) error
- func (p *UsbManagerProxy) GetControlFd(ctx context.Context, function int64) (int32, error)
- func (p *UsbManagerProxy) GetCurrentAccessory(ctx context.Context) (UsbAccessory, error)
- func (p *UsbManagerProxy) GetCurrentFunctions(ctx context.Context) (int64, error)
- func (p *UsbManagerProxy) GetCurrentUsbSpeed(ctx context.Context) (int32, error)
- func (p *UsbManagerProxy) GetDeviceList(ctx context.Context, devices os.Bundle) error
- func (p *UsbManagerProxy) GetGadgetHalVersion(ctx context.Context) (int32, error)
- func (p *UsbManagerProxy) GetPortStatus(ctx context.Context, portId string) (UsbPortStatus, error)
- func (p *UsbManagerProxy) GetPorts(ctx context.Context) ([]ParcelableUsbPort, error)
- func (p *UsbManagerProxy) GetScreenUnlockedFunctions(ctx context.Context) (int64, error)
- func (p *UsbManagerProxy) GetUsbHalVersion(ctx context.Context) (int32, error)
- func (p *UsbManagerProxy) GrantAccessoryPermission(ctx context.Context, accessory UsbAccessory, uid int32) error
- func (p *UsbManagerProxy) GrantDevicePermission(ctx context.Context, device UsbDevice, uid int32) error
- func (p *UsbManagerProxy) HasAccessoryPermission(ctx context.Context, accessory UsbAccessory) (bool, error)
- func (p *UsbManagerProxy) HasAccessoryPermissionWithIdentity(ctx context.Context, accessory UsbAccessory, pid int32, uid int32) (bool, error)
- func (p *UsbManagerProxy) HasDefaults(ctx context.Context, packageName string) (bool, error)
- func (p *UsbManagerProxy) HasDevicePermission(ctx context.Context, device UsbDevice, packageName string) (bool, error)
- func (p *UsbManagerProxy) HasDevicePermissionWithIdentity(ctx context.Context, device UsbDevice, packageName string, pid int32, ...) (bool, error)
- func (p *UsbManagerProxy) IsFunctionEnabled(ctx context.Context, function string) (bool, error)
- func (p *UsbManagerProxy) IsModeChangeSupported(ctx context.Context, portId string) (bool, error)
- func (p *UsbManagerProxy) OpenAccessory(ctx context.Context, accessory UsbAccessory) (int32, error)
- func (p *UsbManagerProxy) OpenDevice(ctx context.Context, deviceName string, packageName string) (int32, error)
- func (p *UsbManagerProxy) RegisterForDisplayPortEvents(ctx context.Context, listener IDisplayPortAltModeInfoListener) (bool, error)
- func (p *UsbManagerProxy) RemoveAccessoryPackagesFromPreferenceDenied(ctx context.Context, device UsbAccessory, packageNames []string, ...) error
- func (p *UsbManagerProxy) RemoveDevicePackagesFromPreferenceDenied(ctx context.Context, device UsbDevice, packageNames []string, ...) error
- func (p *UsbManagerProxy) RequestAccessoryPermission(ctx context.Context, accessory UsbAccessory, packageName string, ...) error
- func (p *UsbManagerProxy) RequestDevicePermission(ctx context.Context, device UsbDevice, packageName string, ...) error
- func (p *UsbManagerProxy) ResetUsbGadget(ctx context.Context) error
- func (p *UsbManagerProxy) ResetUsbPort(ctx context.Context, portId string, operationId int32, ...) error
- func (p *UsbManagerProxy) SetAccessoryPackage(ctx context.Context, accessory UsbAccessory, packageName string) error
- func (p *UsbManagerProxy) SetAccessoryPersistentPermission(ctx context.Context, accessory UsbAccessory, uid int32, user os.UserHandle, ...) error
- func (p *UsbManagerProxy) SetCurrentFunction(ctx context.Context, function string, usbDataUnlocked bool, operationId int32) error
- func (p *UsbManagerProxy) SetCurrentFunctions(ctx context.Context, functions int64, operationId int32) error
- func (p *UsbManagerProxy) SetDevicePackage(ctx context.Context, device UsbDevice, packageName string) error
- func (p *UsbManagerProxy) SetDevicePersistentPermission(ctx context.Context, device UsbDevice, uid int32, user os.UserHandle, ...) error
- func (p *UsbManagerProxy) SetPortRoles(ctx context.Context, portId string, powerRole int32, dataRole int32) error
- func (p *UsbManagerProxy) SetScreenUnlockedFunctions(ctx context.Context, functions int64) error
- func (p *UsbManagerProxy) SetUsbDeviceConnectionHandler(ctx context.Context, usbDeviceConnectionHandler content.ComponentName) error
- func (p *UsbManagerProxy) UnregisterForDisplayPortEvents(ctx context.Context, listener IDisplayPortAltModeInfoListener) error
- type UsbManagerStub
- type UsbOperationInternalProxy
- type UsbOperationInternalStub
- type UsbPortStatus
- type UsbProxy
- func (p *UsbProxy) AsBinder() binder.IBinder
- func (p *UsbProxy) EnableContaminantPresenceDetection(ctx context.Context, portName string, enable bool, transactionId int64) error
- func (p *UsbProxy) EnableUsbData(ctx context.Context, portName string, enable bool, transactionId int64) error
- func (p *UsbProxy) EnableUsbDataWhileDocked(ctx context.Context, portName string, transactionId int64) error
- func (p *UsbProxy) LimitPowerTransfer(ctx context.Context, portName string, limit bool, transactionId int64) error
- func (p *UsbProxy) QueryPortStatus(ctx context.Context, transactionId int64) error
- func (p *UsbProxy) ResetUsbPort(ctx context.Context, portName string, transactionId int64) error
- func (p *UsbProxy) SetCallback(ctx context.Context, callback IUsbCallback) error
- func (p *UsbProxy) SwitchRole(ctx context.Context, portName string, role PortRole, transactionId int64) error
- type UsbSerialReaderProxy
- type UsbSerialReaderStub
- type UsbStub
Constants ¶
const ( TransactionIUsbEnableContaminantPresenceDetection = binder.FirstCallTransaction + 0 TransactionIUsbEnableUsbData = binder.FirstCallTransaction + 1 TransactionIUsbEnableUsbDataWhileDocked = binder.FirstCallTransaction + 2 TransactionIUsbQueryPortStatus = binder.FirstCallTransaction + 3 TransactionIUsbSetCallback = binder.FirstCallTransaction + 4 TransactionIUsbSwitchRole = binder.FirstCallTransaction + 5 TransactionIUsbLimitPowerTransfer = binder.FirstCallTransaction + 6 TransactionIUsbResetUsbPort = binder.FirstCallTransaction + 7 )
const ( MethodIUsbEnableContaminantPresenceDetection = "enableContaminantPresenceDetection" MethodIUsbEnableUsbData = "enableUsbData" MethodIUsbEnableUsbDataWhileDocked = "enableUsbDataWhileDocked" MethodIUsbQueryPortStatus = "queryPortStatus" MethodIUsbSetCallback = "setCallback" MethodIUsbSwitchRole = "switchRole" MethodIUsbLimitPowerTransfer = "limitPowerTransfer" MethodIUsbResetUsbPort = "resetUsbPort" )
const ( TransactionIUsbCallbackNotifyPortStatusChange = binder.FirstCallTransaction + 0 TransactionIUsbCallbackNotifyRoleSwitchStatus = binder.FirstCallTransaction + 1 TransactionIUsbCallbackNotifyEnableUsbDataStatus = binder.FirstCallTransaction + 2 TransactionIUsbCallbackNotifyEnableUsbDataWhileDockedStatus = binder.FirstCallTransaction + 3 TransactionIUsbCallbackNotifyContaminantEnabledStatus = binder.FirstCallTransaction + 4 TransactionIUsbCallbackNotifyQueryPortStatus = binder.FirstCallTransaction + 5 TransactionIUsbCallbackNotifyLimitPowerTransferStatus = binder.FirstCallTransaction + 6 TransactionIUsbCallbackNotifyResetUsbPortStatus = binder.FirstCallTransaction + 7 )
const ( MethodIUsbCallbackNotifyPortStatusChange = "notifyPortStatusChange" MethodIUsbCallbackNotifyRoleSwitchStatus = "notifyRoleSwitchStatus" MethodIUsbCallbackNotifyEnableUsbDataStatus = "notifyEnableUsbDataStatus" MethodIUsbCallbackNotifyEnableUsbDataWhileDockedStatus = "notifyEnableUsbDataWhileDockedStatus" MethodIUsbCallbackNotifyContaminantEnabledStatus = "notifyContaminantEnabledStatus" MethodIUsbCallbackNotifyQueryPortStatus = "notifyQueryPortStatus" MethodIUsbCallbackNotifyLimitPowerTransferStatus = "notifyLimitPowerTransferStatus" MethodIUsbCallbackNotifyResetUsbPortStatus = "notifyResetUsbPortStatus" )
const ( TransactionIUsbManagerGetDeviceList = binder.FirstCallTransaction + 0 TransactionIUsbManagerOpenDevice = binder.FirstCallTransaction + 1 TransactionIUsbManagerGetCurrentAccessory = binder.FirstCallTransaction + 2 TransactionIUsbManagerOpenAccessory = binder.FirstCallTransaction + 3 TransactionIUsbManagerSetDevicePackage = binder.FirstCallTransaction + 4 TransactionIUsbManagerSetAccessoryPackage = binder.FirstCallTransaction + 5 TransactionIUsbManagerAddDevicePackagesToPreferenceDenied = binder.FirstCallTransaction + 6 TransactionIUsbManagerAddAccessoryPackagesToPreferenceDenied = binder.FirstCallTransaction + 7 TransactionIUsbManagerRemoveDevicePackagesFromPreferenceDenied = binder.FirstCallTransaction + 8 TransactionIUsbManagerRemoveAccessoryPackagesFromPreferenceDenied = binder.FirstCallTransaction + 9 TransactionIUsbManagerSetDevicePersistentPermission = binder.FirstCallTransaction + 10 TransactionIUsbManagerSetAccessoryPersistentPermission = binder.FirstCallTransaction + 11 TransactionIUsbManagerHasDevicePermission = binder.FirstCallTransaction + 12 TransactionIUsbManagerHasDevicePermissionWithIdentity = binder.FirstCallTransaction + 13 TransactionIUsbManagerHasAccessoryPermission = binder.FirstCallTransaction + 14 TransactionIUsbManagerHasAccessoryPermissionWithIdentity = binder.FirstCallTransaction + 15 TransactionIUsbManagerRequestDevicePermission = binder.FirstCallTransaction + 16 TransactionIUsbManagerRequestAccessoryPermission = binder.FirstCallTransaction + 17 TransactionIUsbManagerGrantDevicePermission = binder.FirstCallTransaction + 18 TransactionIUsbManagerGrantAccessoryPermission = binder.FirstCallTransaction + 19 TransactionIUsbManagerHasDefaults = binder.FirstCallTransaction + 20 TransactionIUsbManagerClearDefaults = binder.FirstCallTransaction + 21 TransactionIUsbManagerIsFunctionEnabled = binder.FirstCallTransaction + 22 TransactionIUsbManagerSetCurrentFunctions = binder.FirstCallTransaction + 23 TransactionIUsbManagerSetCurrentFunction = binder.FirstCallTransaction + 24 TransactionIUsbManagerGetCurrentFunctions = binder.FirstCallTransaction + 25 TransactionIUsbManagerGetCurrentUsbSpeed = binder.FirstCallTransaction + 26 TransactionIUsbManagerGetGadgetHalVersion = binder.FirstCallTransaction + 27 TransactionIUsbManagerSetScreenUnlockedFunctions = binder.FirstCallTransaction + 28 TransactionIUsbManagerGetScreenUnlockedFunctions = binder.FirstCallTransaction + 29 TransactionIUsbManagerResetUsbGadget = binder.FirstCallTransaction + 30 TransactionIUsbManagerResetUsbPort = binder.FirstCallTransaction + 31 TransactionIUsbManagerEnableUsbData = binder.FirstCallTransaction + 32 TransactionIUsbManagerEnableUsbDataWhileDocked = binder.FirstCallTransaction + 33 TransactionIUsbManagerGetUsbHalVersion = binder.FirstCallTransaction + 34 TransactionIUsbManagerGetControlFd = binder.FirstCallTransaction + 35 TransactionIUsbManagerGetPorts = binder.FirstCallTransaction + 36 TransactionIUsbManagerGetPortStatus = binder.FirstCallTransaction + 37 TransactionIUsbManagerIsModeChangeSupported = binder.FirstCallTransaction + 38 TransactionIUsbManagerSetPortRoles = binder.FirstCallTransaction + 39 TransactionIUsbManagerEnableLimitPowerTransfer = binder.FirstCallTransaction + 40 TransactionIUsbManagerEnableContaminantDetection = binder.FirstCallTransaction + 41 TransactionIUsbManagerSetUsbDeviceConnectionHandler = binder.FirstCallTransaction + 42 TransactionIUsbManagerRegisterForDisplayPortEvents = binder.FirstCallTransaction + 43 TransactionIUsbManagerUnregisterForDisplayPortEvents = binder.FirstCallTransaction + 44 )
const ( MethodIUsbManagerGetDeviceList = "getDeviceList" MethodIUsbManagerOpenDevice = "openDevice" MethodIUsbManagerGetCurrentAccessory = "getCurrentAccessory" MethodIUsbManagerOpenAccessory = "openAccessory" MethodIUsbManagerSetDevicePackage = "setDevicePackage" MethodIUsbManagerSetAccessoryPackage = "setAccessoryPackage" MethodIUsbManagerAddDevicePackagesToPreferenceDenied = "addDevicePackagesToPreferenceDenied" MethodIUsbManagerAddAccessoryPackagesToPreferenceDenied = "addAccessoryPackagesToPreferenceDenied" MethodIUsbManagerRemoveDevicePackagesFromPreferenceDenied = "removeDevicePackagesFromPreferenceDenied" MethodIUsbManagerRemoveAccessoryPackagesFromPreferenceDenied = "removeAccessoryPackagesFromPreferenceDenied" MethodIUsbManagerSetDevicePersistentPermission = "setDevicePersistentPermission" MethodIUsbManagerSetAccessoryPersistentPermission = "setAccessoryPersistentPermission" MethodIUsbManagerHasDevicePermission = "hasDevicePermission" MethodIUsbManagerHasDevicePermissionWithIdentity = "hasDevicePermissionWithIdentity" MethodIUsbManagerHasAccessoryPermission = "hasAccessoryPermission" MethodIUsbManagerHasAccessoryPermissionWithIdentity = "hasAccessoryPermissionWithIdentity" MethodIUsbManagerRequestDevicePermission = "requestDevicePermission" MethodIUsbManagerRequestAccessoryPermission = "requestAccessoryPermission" MethodIUsbManagerGrantDevicePermission = "grantDevicePermission" MethodIUsbManagerGrantAccessoryPermission = "grantAccessoryPermission" MethodIUsbManagerHasDefaults = "hasDefaults" MethodIUsbManagerClearDefaults = "clearDefaults" MethodIUsbManagerIsFunctionEnabled = "isFunctionEnabled" MethodIUsbManagerSetCurrentFunctions = "setCurrentFunctions" MethodIUsbManagerSetCurrentFunction = "setCurrentFunction" MethodIUsbManagerGetCurrentFunctions = "getCurrentFunctions" MethodIUsbManagerGetCurrentUsbSpeed = "getCurrentUsbSpeed" MethodIUsbManagerGetGadgetHalVersion = "getGadgetHalVersion" MethodIUsbManagerSetScreenUnlockedFunctions = "setScreenUnlockedFunctions" MethodIUsbManagerGetScreenUnlockedFunctions = "getScreenUnlockedFunctions" MethodIUsbManagerResetUsbGadget = "resetUsbGadget" MethodIUsbManagerResetUsbPort = "resetUsbPort" MethodIUsbManagerEnableUsbData = "enableUsbData" MethodIUsbManagerEnableUsbDataWhileDocked = "enableUsbDataWhileDocked" MethodIUsbManagerGetUsbHalVersion = "getUsbHalVersion" MethodIUsbManagerGetControlFd = "getControlFd" MethodIUsbManagerGetPorts = "getPorts" MethodIUsbManagerGetPortStatus = "getPortStatus" MethodIUsbManagerIsModeChangeSupported = "isModeChangeSupported" MethodIUsbManagerSetPortRoles = "setPortRoles" MethodIUsbManagerEnableLimitPowerTransfer = "enableLimitPowerTransfer" MethodIUsbManagerEnableContaminantDetection = "enableContaminantDetection" MethodIUsbManagerSetUsbDeviceConnectionHandler = "setUsbDeviceConnectionHandler" MethodIUsbManagerRegisterForDisplayPortEvents = "registerForDisplayPortEvents" MethodIUsbManagerUnregisterForDisplayPortEvents = "unregisterForDisplayPortEvents" )
const ( PortRoleTagPowerRole int32 = 0 PortRoleTagDataRole int32 = 1 PortRoleTagMode int32 = 2 )
const (
AltModeDataTagDisplayPortAltModeData int32 = 0
)
const DescriptorIDisplayPortAltModeInfoListener = "android.hardware.usb.IDisplayPortAltModeInfoListener"
const DescriptorIUsb = "android.hardware.usb.IUsb"
const DescriptorIUsbCallback = "android.hardware.usb.IUsbCallback"
const DescriptorIUsbManager = "android.hardware.usb.IUsbManager"
const DescriptorIUsbOperationInternal = "android.hardware.usb.IUsbOperationInternal"
const DescriptorIUsbSerialReader = "android.hardware.usb.IUsbSerialReader"
const (
MethodIDisplayPortAltModeInfoListenerOnDisplayPortAltModeInfoChanged = "onDisplayPortAltModeInfoChanged"
)
const (
MethodIUsbOperationInternalOnOperationComplete = "onOperationComplete"
)
const (
MethodIUsbSerialReaderGetSerial = "getSerial"
)
const (
TransactionIDisplayPortAltModeInfoListenerOnDisplayPortAltModeInfoChanged = binder.FirstCallTransaction + 0
)
const (
TransactionIUsbOperationInternalOnOperationComplete = binder.FirstCallTransaction + 0
)
const (
TransactionIUsbSerialReaderGetSerial = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AltModeData ¶
type AltModeData struct {
Tag int32
DisplayPortAltModeData AltModeDataDisplayPortAltModeData
}
func (*AltModeData) GetDisplayPortAltModeData ¶
func (u *AltModeData) GetDisplayPortAltModeData() (AltModeDataDisplayPortAltModeData, bool)
func (*AltModeData) MarshalParcel ¶
func (u *AltModeData) MarshalParcel( p *parcel.Parcel, ) error
func (*AltModeData) SetDisplayPortAltModeData ¶
func (u *AltModeData) SetDisplayPortAltModeData( v AltModeDataDisplayPortAltModeData, )
func (*AltModeData) UnmarshalParcel ¶
func (u *AltModeData) UnmarshalParcel( p *parcel.Parcel, ) error
type AltModeDataDisplayPortAltModeData ¶
type AltModeDataDisplayPortAltModeData struct {
PartnerSinkStatus DisplayPortAltModeStatus
CableStatus DisplayPortAltModeStatus
PinAssignment DisplayPortAltModePinAssignment
Hpd bool
LinkTrainingStatus LinkTrainingStatus
}
func (*AltModeDataDisplayPortAltModeData) MarshalParcel ¶
func (s *AltModeDataDisplayPortAltModeData) MarshalParcel( p *parcel.Parcel, ) error
func (*AltModeDataDisplayPortAltModeData) UnmarshalParcel ¶
func (s *AltModeDataDisplayPortAltModeData) UnmarshalParcel( p *parcel.Parcel, ) error
type ComplianceWarning ¶
type ComplianceWarning int32
const ( ComplianceWarningOTHER ComplianceWarning = 1 ComplianceWarningDebugAccessory ComplianceWarning = 2 ComplianceWarningBc12 ComplianceWarning = 3 ComplianceWarningMissingRp ComplianceWarning = 4 ComplianceWarningInputPowerLimited ComplianceWarning = 5 ComplianceWarningMissingDataLines ComplianceWarning = 6 ComplianceWarningEnumerationFail ComplianceWarning = 7 ComplianceWarningFlakyConnection ComplianceWarning = 8 ComplianceWarningUnreliableIo ComplianceWarning = 9 )
type ContaminantDetectionStatus ¶
type ContaminantDetectionStatus int32
const ( ContaminantDetectionStatusNotSupported ContaminantDetectionStatus = 0 ContaminantDetectionStatusDISABLED ContaminantDetectionStatus = 1 ContaminantDetectionStatusNotDetected ContaminantDetectionStatus = 2 ContaminantDetectionStatusDETECTED ContaminantDetectionStatus = 3 )
type ContaminantProtectionMode ¶
type ContaminantProtectionMode int32
const ( ContaminantProtectionModeNONE ContaminantProtectionMode = 0 ContaminantProtectionModeForceSink ContaminantProtectionMode = 1 ContaminantProtectionModeForceSource ContaminantProtectionMode = 2 ContaminantProtectionModeForceDisable ContaminantProtectionMode = 3 )
type ContaminantProtectionStatus ¶
type ContaminantProtectionStatus int32
const ( ContaminantProtectionStatusNONE ContaminantProtectionStatus = 0 ContaminantProtectionStatusForceSink ContaminantProtectionStatus = 1 ContaminantProtectionStatusForceSource ContaminantProtectionStatus = 2 ContaminantProtectionStatusForceDisable ContaminantProtectionStatus = 3 ContaminantProtectionStatusDISABLED ContaminantProtectionStatus = 4 )
type DisplayPortAltModeInfo ¶
type DisplayPortAltModeInfo struct {
PartnerSinkStatus int32
CableStatus int32
NumLanes int32
HotPlugDetect bool
LinkTrainingStatus int32
}
func (*DisplayPortAltModeInfo) MarshalParcel ¶
func (s *DisplayPortAltModeInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*DisplayPortAltModeInfo) UnmarshalParcel ¶
func (s *DisplayPortAltModeInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type DisplayPortAltModeInfoListenerProxy ¶
func NewDisplayPortAltModeInfoListenerProxy ¶
func NewDisplayPortAltModeInfoListenerProxy( remote binder.IBinder, ) *DisplayPortAltModeInfoListenerProxy
func (*DisplayPortAltModeInfoListenerProxy) AsBinder ¶
func (p *DisplayPortAltModeInfoListenerProxy) AsBinder() binder.IBinder
func (*DisplayPortAltModeInfoListenerProxy) OnDisplayPortAltModeInfoChanged ¶
func (p *DisplayPortAltModeInfoListenerProxy) OnDisplayPortAltModeInfoChanged( ctx context.Context, portId string, DisplayPortAltModeInfo DisplayPortAltModeInfo, ) error
type DisplayPortAltModeInfoListenerStub ¶
type DisplayPortAltModeInfoListenerStub struct {
Impl IDisplayPortAltModeInfoListener
Transport binder.VersionAwareTransport
}
DisplayPortAltModeInfoListenerStub dispatches incoming binder transactions to a typed IDisplayPortAltModeInfoListener implementation.
func (*DisplayPortAltModeInfoListenerStub) Descriptor ¶
func (s *DisplayPortAltModeInfoListenerStub) Descriptor() string
func (*DisplayPortAltModeInfoListenerStub) OnTransaction ¶
func (s *DisplayPortAltModeInfoListenerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type DisplayPortAltModePinAssignment ¶
type DisplayPortAltModePinAssignment int32
const ( DisplayPortAltModePinAssignmentNONE DisplayPortAltModePinAssignment = 0 DisplayPortAltModePinAssignmentA DisplayPortAltModePinAssignment = 1 DisplayPortAltModePinAssignmentB DisplayPortAltModePinAssignment = 2 DisplayPortAltModePinAssignmentC DisplayPortAltModePinAssignment = 3 DisplayPortAltModePinAssignmentD DisplayPortAltModePinAssignment = 4 DisplayPortAltModePinAssignmentE DisplayPortAltModePinAssignment = 5 DisplayPortAltModePinAssignmentF DisplayPortAltModePinAssignment = 6 )
type DisplayPortAltModeStatus ¶
type DisplayPortAltModeStatus int32
const ( DisplayPortAltModeStatusUNKNOWN DisplayPortAltModeStatus = 0 DisplayPortAltModeStatusNotCapable DisplayPortAltModeStatus = 1 DisplayPortAltModeStatusCAPABLE DisplayPortAltModeStatus = 2 DisplayPortAltModeStatusENABLED DisplayPortAltModeStatus = 3 )
type IDisplayPortAltModeInfoListener ¶
type IDisplayPortAltModeInfoListener interface {
AsBinder() binder.IBinder
OnDisplayPortAltModeInfoChanged(ctx context.Context, portId string, DisplayPortAltModeInfo DisplayPortAltModeInfo) error
}
func NewDisplayPortAltModeInfoListenerStub ¶
func NewDisplayPortAltModeInfoListenerStub( impl IDisplayPortAltModeInfoListenerServer, ) IDisplayPortAltModeInfoListener
NewDisplayPortAltModeInfoListenerStub creates a server-side IDisplayPortAltModeInfoListener wrapping the given server implementation. The returned value satisfies IDisplayPortAltModeInfoListener 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 IDisplayPortAltModeInfoListenerServer ¶
type IDisplayPortAltModeInfoListenerServer interface {
OnDisplayPortAltModeInfoChanged(ctx context.Context, portId string, DisplayPortAltModeInfo DisplayPortAltModeInfo) error
}
IDisplayPortAltModeInfoListenerServer is the server-side interface that user implementations provide to NewDisplayPortAltModeInfoListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IUsb ¶
type IUsb interface {
AsBinder() binder.IBinder
EnableContaminantPresenceDetection(ctx context.Context, portName string, enable bool, transactionId int64) error
EnableUsbData(ctx context.Context, portName string, enable bool, transactionId int64) error
EnableUsbDataWhileDocked(ctx context.Context, portName string, transactionId int64) error
QueryPortStatus(ctx context.Context, transactionId int64) error
SetCallback(ctx context.Context, callback IUsbCallback) error
SwitchRole(ctx context.Context, portName string, role PortRole, transactionId int64) error
LimitPowerTransfer(ctx context.Context, portName string, limit bool, transactionId int64) error
ResetUsbPort(ctx context.Context, portName string, transactionId int64) error
}
func NewUsbStub ¶
func NewUsbStub( impl IUsbServer, ) IUsb
NewUsbStub creates a server-side IUsb wrapping the given server implementation. The returned value satisfies IUsb 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 IUsbCallback ¶
type IUsbCallback interface {
AsBinder() binder.IBinder
NotifyPortStatusChange(ctx context.Context, currentPortStatus []PortStatus, retval Status) error
NotifyRoleSwitchStatus(ctx context.Context, portName string, newRole PortRole, retval Status, transactionId int64) error
NotifyEnableUsbDataStatus(ctx context.Context, portName string, enable bool, retval Status, transactionId int64) error
NotifyEnableUsbDataWhileDockedStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
NotifyContaminantEnabledStatus(ctx context.Context, portName string, enable bool, retval Status, transactionId int64) error
NotifyQueryPortStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
NotifyLimitPowerTransferStatus(ctx context.Context, portName string, limit bool, retval Status, transactionId int64) error
NotifyResetUsbPortStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
}
func NewUsbCallbackStub ¶
func NewUsbCallbackStub( impl IUsbCallbackServer, ) IUsbCallback
NewUsbCallbackStub creates a server-side IUsbCallback wrapping the given server implementation. The returned value satisfies IUsbCallback 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 IUsbCallbackServer ¶
type IUsbCallbackServer interface {
NotifyPortStatusChange(ctx context.Context, currentPortStatus []PortStatus, retval Status) error
NotifyRoleSwitchStatus(ctx context.Context, portName string, newRole PortRole, retval Status, transactionId int64) error
NotifyEnableUsbDataStatus(ctx context.Context, portName string, enable bool, retval Status, transactionId int64) error
NotifyEnableUsbDataWhileDockedStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
NotifyContaminantEnabledStatus(ctx context.Context, portName string, enable bool, retval Status, transactionId int64) error
NotifyQueryPortStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
NotifyLimitPowerTransferStatus(ctx context.Context, portName string, limit bool, retval Status, transactionId int64) error
NotifyResetUsbPortStatus(ctx context.Context, portName string, retval Status, transactionId int64) error
}
IUsbCallbackServer is the server-side interface that user implementations provide to NewUsbCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IUsbManager ¶
type IUsbManager interface {
AsBinder() binder.IBinder
GetDeviceList(ctx context.Context, devices os.Bundle) error
OpenDevice(ctx context.Context, deviceName string, packageName string) (int32, error)
GetCurrentAccessory(ctx context.Context) (UsbAccessory, error)
OpenAccessory(ctx context.Context, accessory UsbAccessory) (int32, error)
SetDevicePackage(ctx context.Context, device UsbDevice, packageName string) error
SetAccessoryPackage(ctx context.Context, accessory UsbAccessory, packageName string) error
AddDevicePackagesToPreferenceDenied(ctx context.Context, device UsbDevice, packageNames []string, user os.UserHandle) error
AddAccessoryPackagesToPreferenceDenied(ctx context.Context, accessory UsbAccessory, packageNames []string, user os.UserHandle) error
RemoveDevicePackagesFromPreferenceDenied(ctx context.Context, device UsbDevice, packageNames []string, user os.UserHandle) error
RemoveAccessoryPackagesFromPreferenceDenied(ctx context.Context, device UsbAccessory, packageNames []string, user os.UserHandle) error
SetDevicePersistentPermission(ctx context.Context, device UsbDevice, uid int32, user os.UserHandle, shouldBeGranted bool) error
SetAccessoryPersistentPermission(ctx context.Context, accessory UsbAccessory, uid int32, user os.UserHandle, shouldBeGranted bool) error
HasDevicePermission(ctx context.Context, device UsbDevice, packageName string) (bool, error)
HasDevicePermissionWithIdentity(ctx context.Context, device UsbDevice, packageName string, pid int32, uid int32) (bool, error)
HasAccessoryPermission(ctx context.Context, accessory UsbAccessory) (bool, error)
HasAccessoryPermissionWithIdentity(ctx context.Context, accessory UsbAccessory, pid int32, uid int32) (bool, error)
RequestDevicePermission(ctx context.Context, device UsbDevice, packageName string, pi app.PendingIntent) error
RequestAccessoryPermission(ctx context.Context, accessory UsbAccessory, packageName string, pi app.PendingIntent) error
GrantDevicePermission(ctx context.Context, device UsbDevice, uid int32) error
GrantAccessoryPermission(ctx context.Context, accessory UsbAccessory, uid int32) error
HasDefaults(ctx context.Context, packageName string) (bool, error)
ClearDefaults(ctx context.Context, packageName string) error
IsFunctionEnabled(ctx context.Context, function string) (bool, error)
SetCurrentFunctions(ctx context.Context, functions int64, operationId int32) error
SetCurrentFunction(ctx context.Context, function string, usbDataUnlocked bool, operationId int32) error
GetCurrentFunctions(ctx context.Context) (int64, error)
GetCurrentUsbSpeed(ctx context.Context) (int32, error)
GetGadgetHalVersion(ctx context.Context) (int32, error)
SetScreenUnlockedFunctions(ctx context.Context, functions int64) error
GetScreenUnlockedFunctions(ctx context.Context) (int64, error)
ResetUsbGadget(ctx context.Context) error
ResetUsbPort(ctx context.Context, portId string, operationId int32, callback IUsbOperationInternal) error
EnableUsbData(ctx context.Context, portId string, enable bool, operationId int32, callback IUsbOperationInternal) (bool, error)
EnableUsbDataWhileDocked(ctx context.Context, portId string, operationId int32, callback IUsbOperationInternal) error
GetUsbHalVersion(ctx context.Context) (int32, error)
GetControlFd(ctx context.Context, function int64) (int32, error)
GetPorts(ctx context.Context) ([]ParcelableUsbPort, error)
GetPortStatus(ctx context.Context, portId string) (UsbPortStatus, error)
IsModeChangeSupported(ctx context.Context, portId string) (bool, error)
SetPortRoles(ctx context.Context, portId string, powerRole int32, dataRole int32) error
EnableLimitPowerTransfer(ctx context.Context, portId string, limit bool, operationId int32, callback IUsbOperationInternal) error
EnableContaminantDetection(ctx context.Context, portId string, enable bool) error
SetUsbDeviceConnectionHandler(ctx context.Context, usbDeviceConnectionHandler content.ComponentName) error
RegisterForDisplayPortEvents(ctx context.Context, listener IDisplayPortAltModeInfoListener) (bool, error)
UnregisterForDisplayPortEvents(ctx context.Context, listener IDisplayPortAltModeInfoListener) error
}
func NewUsbManagerStub ¶
func NewUsbManagerStub( impl IUsbManagerServer, ) IUsbManager
NewUsbManagerStub creates a server-side IUsbManager wrapping the given server implementation. The returned value satisfies IUsbManager 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 IUsbManagerServer ¶
type IUsbManagerServer interface {
GetDeviceList(ctx context.Context, devices os.Bundle) error
OpenDevice(ctx context.Context, deviceName string, packageName string) (int32, error)
GetCurrentAccessory(ctx context.Context) (UsbAccessory, error)
OpenAccessory(ctx context.Context, accessory UsbAccessory) (int32, error)
SetDevicePackage(ctx context.Context, device UsbDevice, packageName string) error
SetAccessoryPackage(ctx context.Context, accessory UsbAccessory, packageName string) error
AddDevicePackagesToPreferenceDenied(ctx context.Context, device UsbDevice, packageNames []string, user os.UserHandle) error
AddAccessoryPackagesToPreferenceDenied(ctx context.Context, accessory UsbAccessory, packageNames []string, user os.UserHandle) error
RemoveDevicePackagesFromPreferenceDenied(ctx context.Context, device UsbDevice, packageNames []string, user os.UserHandle) error
RemoveAccessoryPackagesFromPreferenceDenied(ctx context.Context, device UsbAccessory, packageNames []string, user os.UserHandle) error
SetDevicePersistentPermission(ctx context.Context, device UsbDevice, uid int32, user os.UserHandle, shouldBeGranted bool) error
SetAccessoryPersistentPermission(ctx context.Context, accessory UsbAccessory, uid int32, user os.UserHandle, shouldBeGranted bool) error
HasDevicePermission(ctx context.Context, device UsbDevice, packageName string) (bool, error)
HasDevicePermissionWithIdentity(ctx context.Context, device UsbDevice, packageName string, pid int32, uid int32) (bool, error)
HasAccessoryPermission(ctx context.Context, accessory UsbAccessory) (bool, error)
HasAccessoryPermissionWithIdentity(ctx context.Context, accessory UsbAccessory, pid int32, uid int32) (bool, error)
RequestDevicePermission(ctx context.Context, device UsbDevice, packageName string, pi app.PendingIntent) error
RequestAccessoryPermission(ctx context.Context, accessory UsbAccessory, packageName string, pi app.PendingIntent) error
GrantDevicePermission(ctx context.Context, device UsbDevice, uid int32) error
GrantAccessoryPermission(ctx context.Context, accessory UsbAccessory, uid int32) error
HasDefaults(ctx context.Context, packageName string) (bool, error)
ClearDefaults(ctx context.Context, packageName string) error
IsFunctionEnabled(ctx context.Context, function string) (bool, error)
SetCurrentFunctions(ctx context.Context, functions int64, operationId int32) error
SetCurrentFunction(ctx context.Context, function string, usbDataUnlocked bool, operationId int32) error
GetCurrentFunctions(ctx context.Context) (int64, error)
GetCurrentUsbSpeed(ctx context.Context) (int32, error)
GetGadgetHalVersion(ctx context.Context) (int32, error)
SetScreenUnlockedFunctions(ctx context.Context, functions int64) error
GetScreenUnlockedFunctions(ctx context.Context) (int64, error)
ResetUsbGadget(ctx context.Context) error
ResetUsbPort(ctx context.Context, portId string, operationId int32, callback IUsbOperationInternal) error
EnableUsbData(ctx context.Context, portId string, enable bool, operationId int32, callback IUsbOperationInternal) (bool, error)
EnableUsbDataWhileDocked(ctx context.Context, portId string, operationId int32, callback IUsbOperationInternal) error
GetUsbHalVersion(ctx context.Context) (int32, error)
GetControlFd(ctx context.Context, function int64) (int32, error)
GetPorts(ctx context.Context) ([]ParcelableUsbPort, error)
GetPortStatus(ctx context.Context, portId string) (UsbPortStatus, error)
IsModeChangeSupported(ctx context.Context, portId string) (bool, error)
SetPortRoles(ctx context.Context, portId string, powerRole int32, dataRole int32) error
EnableLimitPowerTransfer(ctx context.Context, portId string, limit bool, operationId int32, callback IUsbOperationInternal) error
EnableContaminantDetection(ctx context.Context, portId string, enable bool) error
SetUsbDeviceConnectionHandler(ctx context.Context, usbDeviceConnectionHandler content.ComponentName) error
RegisterForDisplayPortEvents(ctx context.Context, listener IDisplayPortAltModeInfoListener) (bool, error)
UnregisterForDisplayPortEvents(ctx context.Context, listener IDisplayPortAltModeInfoListener) error
}
IUsbManagerServer is the server-side interface that user implementations provide to NewUsbManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IUsbOperationInternal ¶
type IUsbOperationInternal interface {
AsBinder() binder.IBinder
OnOperationComplete(ctx context.Context, status int32) error
}
func NewUsbOperationInternalStub ¶
func NewUsbOperationInternalStub( impl IUsbOperationInternalServer, ) IUsbOperationInternal
NewUsbOperationInternalStub creates a server-side IUsbOperationInternal wrapping the given server implementation. The returned value satisfies IUsbOperationInternal 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 IUsbOperationInternalServer ¶
type IUsbOperationInternalServer interface {
OnOperationComplete(ctx context.Context, status int32) error
}
IUsbOperationInternalServer is the server-side interface that user implementations provide to NewUsbOperationInternalStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IUsbSerialReader ¶
type IUsbSerialReader interface {
AsBinder() binder.IBinder
GetSerial(ctx context.Context, packageName string) (string, error)
}
func NewUsbSerialReaderStub ¶
func NewUsbSerialReaderStub( impl IUsbSerialReaderServer, ) IUsbSerialReader
NewUsbSerialReaderStub creates a server-side IUsbSerialReader wrapping the given server implementation. The returned value satisfies IUsbSerialReader 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 IUsbSerialReaderServer ¶
type IUsbSerialReaderServer interface {
GetSerial(ctx context.Context, packageName string) (string, error)
}
IUsbSerialReaderServer is the server-side interface that user implementations provide to NewUsbSerialReaderStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IUsbServer ¶
type IUsbServer interface {
EnableContaminantPresenceDetection(ctx context.Context, portName string, enable bool, transactionId int64) error
EnableUsbData(ctx context.Context, portName string, enable bool, transactionId int64) error
EnableUsbDataWhileDocked(ctx context.Context, portName string, transactionId int64) error
QueryPortStatus(ctx context.Context, transactionId int64) error
SetCallback(ctx context.Context, callback IUsbCallback) error
SwitchRole(ctx context.Context, portName string, role PortRole, transactionId int64) error
LimitPowerTransfer(ctx context.Context, portName string, limit bool, transactionId int64) error
ResetUsbPort(ctx context.Context, portName string, transactionId int64) error
}
IUsbServer is the server-side interface that user implementations provide to NewUsbStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type LinkTrainingStatus ¶
type LinkTrainingStatus int32
const ( LinkTrainingStatusUNKNOWN LinkTrainingStatus = 0 LinkTrainingStatusSUCCESS LinkTrainingStatus = 1 LinkTrainingStatusFAILURE LinkTrainingStatus = 2 )
type ParcelableUsbPort ¶
type ParcelableUsbPort struct {
Id string
SupportedModes int32
SupportedContaminantProtectionModes int32
SupportsEnableContaminantPresenceProtection bool
SupportsEnableContaminantPresenceDetection bool
SupportsComplianceWarnings bool
SupportedAltModesMask int32
}
func (*ParcelableUsbPort) MarshalParcel ¶
func (s *ParcelableUsbPort) MarshalParcel( p *parcel.Parcel, ) error
func (*ParcelableUsbPort) UnmarshalParcel ¶
func (s *ParcelableUsbPort) UnmarshalParcel( p *parcel.Parcel, ) error
type PlugOrientation ¶
type PlugOrientation int32
const ( PlugOrientationUNKNOWN PlugOrientation = 0 PlugOrientationUNPLUGGED PlugOrientation = 1 PlugOrientationPluggedUnknown PlugOrientation = 2 PlugOrientationPluggedNormal PlugOrientation = 3 PlugOrientationPluggedFlipped PlugOrientation = 4 )
type PortDataRole ¶
type PortDataRole int32
const ( PortDataRoleNONE PortDataRole = 0 PortDataRoleHOST PortDataRole = 1 PortDataRoleDEVICE PortDataRole = 2 )
type PortPowerRole ¶
type PortPowerRole int32
const ( PortPowerRoleNONE PortPowerRole = 0 PortPowerRoleSOURCE PortPowerRole = 1 PortPowerRoleSINK PortPowerRole = 2 )
type PortRole ¶
type PortRole struct {
Tag int32
PowerRole PortPowerRole
DataRole PortDataRole
Mode PortMode
}
func (*PortRole) GetDataRole ¶
func (u *PortRole) GetDataRole() (PortDataRole, bool)
func (*PortRole) GetPowerRole ¶
func (u *PortRole) GetPowerRole() (PortPowerRole, bool)
func (*PortRole) SetDataRole ¶
func (u *PortRole) SetDataRole( v PortDataRole, )
func (*PortRole) SetPowerRole ¶
func (u *PortRole) SetPowerRole( v PortPowerRole, )
type PortStatus ¶
type PortStatus struct {
PortName string
CurrentDataRole PortDataRole
CurrentPowerRole PortPowerRole
CurrentMode PortMode
CanChangeMode bool
CanChangeDataRole bool
CanChangePowerRole bool
SupportedModes []PortMode
SupportedContaminantProtectionModes []ContaminantProtectionMode
SupportsEnableContaminantPresenceProtection bool
ContaminantProtectionStatus ContaminantProtectionStatus
SupportsEnableContaminantPresenceDetection bool
ContaminantDetectionStatus ContaminantDetectionStatus
UsbDataStatus []UsbDataStatus
PowerTransferLimited bool
PowerBrickStatus PowerBrickStatus
SupportsComplianceWarnings bool
ComplianceWarnings []ComplianceWarning
PlugOrientation PlugOrientation
SupportedAltModes []AltModeData
}
func (*PortStatus) MarshalParcel ¶
func (s *PortStatus) MarshalParcel( p *parcel.Parcel, ) error
func (*PortStatus) UnmarshalParcel ¶
func (s *PortStatus) UnmarshalParcel( p *parcel.Parcel, ) error
type PowerBrickStatus ¶
type PowerBrickStatus int32
const ( PowerBrickStatusUNKNOWN PowerBrickStatus = 0 PowerBrickStatusCONNECTED PowerBrickStatus = 1 PowerBrickStatusNotConnected PowerBrickStatus = 2 )
type UsbAccessory ¶
type UsbAccessory struct {
Manufacturer string
Model string
Description string
Version string
Uri string
}
func (*UsbAccessory) MarshalParcel ¶
func (s *UsbAccessory) MarshalParcel( p *parcel.Parcel, ) error
func (*UsbAccessory) UnmarshalParcel ¶
func (s *UsbAccessory) UnmarshalParcel( p *parcel.Parcel, ) error
type UsbCallbackProxy ¶
func NewUsbCallbackProxy ¶
func NewUsbCallbackProxy( remote binder.IBinder, ) *UsbCallbackProxy
func (*UsbCallbackProxy) AsBinder ¶
func (p *UsbCallbackProxy) AsBinder() binder.IBinder
func (*UsbCallbackProxy) NotifyContaminantEnabledStatus ¶
func (*UsbCallbackProxy) NotifyEnableUsbDataStatus ¶
func (*UsbCallbackProxy) NotifyEnableUsbDataWhileDockedStatus ¶
func (*UsbCallbackProxy) NotifyLimitPowerTransferStatus ¶
func (*UsbCallbackProxy) NotifyPortStatusChange ¶
func (p *UsbCallbackProxy) NotifyPortStatusChange( ctx context.Context, currentPortStatus []PortStatus, retval Status, ) error
func (*UsbCallbackProxy) NotifyQueryPortStatus ¶
func (*UsbCallbackProxy) NotifyResetUsbPortStatus ¶
func (*UsbCallbackProxy) NotifyRoleSwitchStatus ¶
type UsbCallbackStub ¶
type UsbCallbackStub struct {
Impl IUsbCallback
Transport binder.VersionAwareTransport
}
UsbCallbackStub dispatches incoming binder transactions to a typed IUsbCallback implementation.
func (*UsbCallbackStub) Descriptor ¶
func (s *UsbCallbackStub) Descriptor() string
func (*UsbCallbackStub) OnTransaction ¶
func (s *UsbCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type UsbDataStatus ¶
type UsbDataStatus int32
const ( UsbDataStatusUNKNOWN UsbDataStatus = 0 UsbDataStatusENABLED UsbDataStatus = 1 UsbDataStatusDisabledOverheat UsbDataStatus = 2 UsbDataStatusDisabledContaminant UsbDataStatus = 3 UsbDataStatusDisabledDock UsbDataStatus = 4 UsbDataStatusDisabledForce UsbDataStatus = 5 UsbDataStatusDisabledDebug UsbDataStatus = 6 UsbDataStatusDisabledDockHostMode UsbDataStatus = 7 UsbDataStatusDisabledDockDeviceMode UsbDataStatus = 8 )
type UsbDevice ¶
type UsbEndpoint ¶
func (*UsbEndpoint) MarshalParcel ¶
func (s *UsbEndpoint) MarshalParcel( p *parcel.Parcel, ) error
func (*UsbEndpoint) UnmarshalParcel ¶
func (s *UsbEndpoint) UnmarshalParcel( p *parcel.Parcel, ) error
type UsbInterface ¶
type UsbInterface struct {
Id int32
AlternateSetting int32
Name string
Class int32
Subclass int32
Protocol int32
}
func (*UsbInterface) MarshalParcel ¶
func (s *UsbInterface) MarshalParcel( p *parcel.Parcel, ) error
func (*UsbInterface) UnmarshalParcel ¶
func (s *UsbInterface) UnmarshalParcel( p *parcel.Parcel, ) error
type UsbManagerProxy ¶
func GetUsbManager ¶
func GetUsbManager( ctx context.Context, sm *servicemanager.ServiceManager, ) (*UsbManagerProxy, error)
GetUsbManager retrieves the UsbService service and returns a typed proxy.
func NewUsbManagerProxy ¶
func NewUsbManagerProxy( remote binder.IBinder, ) *UsbManagerProxy
func (*UsbManagerProxy) AddAccessoryPackagesToPreferenceDenied ¶
func (p *UsbManagerProxy) AddAccessoryPackagesToPreferenceDenied( ctx context.Context, accessory UsbAccessory, packageNames []string, user os.UserHandle, ) error
func (*UsbManagerProxy) AddDevicePackagesToPreferenceDenied ¶
func (p *UsbManagerProxy) AddDevicePackagesToPreferenceDenied( ctx context.Context, device UsbDevice, packageNames []string, user os.UserHandle, ) error
func (*UsbManagerProxy) AsBinder ¶
func (p *UsbManagerProxy) AsBinder() binder.IBinder
func (*UsbManagerProxy) ClearDefaults ¶
func (p *UsbManagerProxy) ClearDefaults( ctx context.Context, packageName string, ) error
func (*UsbManagerProxy) EnableContaminantDetection ¶
func (*UsbManagerProxy) EnableLimitPowerTransfer ¶
func (p *UsbManagerProxy) EnableLimitPowerTransfer( ctx context.Context, portId string, limit bool, operationId int32, callback IUsbOperationInternal, ) error
func (*UsbManagerProxy) EnableUsbData ¶
func (p *UsbManagerProxy) EnableUsbData( ctx context.Context, portId string, enable bool, operationId int32, callback IUsbOperationInternal, ) (bool, error)
func (*UsbManagerProxy) EnableUsbDataWhileDocked ¶
func (p *UsbManagerProxy) EnableUsbDataWhileDocked( ctx context.Context, portId string, operationId int32, callback IUsbOperationInternal, ) error
func (*UsbManagerProxy) GetControlFd ¶
func (*UsbManagerProxy) GetCurrentAccessory ¶
func (p *UsbManagerProxy) GetCurrentAccessory( ctx context.Context, ) (UsbAccessory, error)
func (*UsbManagerProxy) GetCurrentFunctions ¶
func (p *UsbManagerProxy) GetCurrentFunctions( ctx context.Context, ) (int64, error)
func (*UsbManagerProxy) GetCurrentUsbSpeed ¶
func (p *UsbManagerProxy) GetCurrentUsbSpeed( ctx context.Context, ) (int32, error)
func (*UsbManagerProxy) GetDeviceList ¶
func (*UsbManagerProxy) GetGadgetHalVersion ¶
func (p *UsbManagerProxy) GetGadgetHalVersion( ctx context.Context, ) (int32, error)
func (*UsbManagerProxy) GetPortStatus ¶
func (p *UsbManagerProxy) GetPortStatus( ctx context.Context, portId string, ) (UsbPortStatus, error)
func (*UsbManagerProxy) GetPorts ¶
func (p *UsbManagerProxy) GetPorts( ctx context.Context, ) ([]ParcelableUsbPort, error)
func (*UsbManagerProxy) GetScreenUnlockedFunctions ¶
func (p *UsbManagerProxy) GetScreenUnlockedFunctions( ctx context.Context, ) (int64, error)
func (*UsbManagerProxy) GetUsbHalVersion ¶
func (p *UsbManagerProxy) GetUsbHalVersion( ctx context.Context, ) (int32, error)
func (*UsbManagerProxy) GrantAccessoryPermission ¶
func (p *UsbManagerProxy) GrantAccessoryPermission( ctx context.Context, accessory UsbAccessory, uid int32, ) error
func (*UsbManagerProxy) GrantDevicePermission ¶
func (*UsbManagerProxy) HasAccessoryPermission ¶
func (p *UsbManagerProxy) HasAccessoryPermission( ctx context.Context, accessory UsbAccessory, ) (bool, error)
func (*UsbManagerProxy) HasAccessoryPermissionWithIdentity ¶
func (p *UsbManagerProxy) HasAccessoryPermissionWithIdentity( ctx context.Context, accessory UsbAccessory, pid int32, uid int32, ) (bool, error)
func (*UsbManagerProxy) HasDefaults ¶
func (*UsbManagerProxy) HasDevicePermission ¶
func (*UsbManagerProxy) HasDevicePermissionWithIdentity ¶
func (*UsbManagerProxy) IsFunctionEnabled ¶
func (*UsbManagerProxy) IsModeChangeSupported ¶
func (*UsbManagerProxy) OpenAccessory ¶
func (p *UsbManagerProxy) OpenAccessory( ctx context.Context, accessory UsbAccessory, ) (int32, error)
func (*UsbManagerProxy) OpenDevice ¶
func (*UsbManagerProxy) RegisterForDisplayPortEvents ¶
func (p *UsbManagerProxy) RegisterForDisplayPortEvents( ctx context.Context, listener IDisplayPortAltModeInfoListener, ) (bool, error)
func (*UsbManagerProxy) RemoveAccessoryPackagesFromPreferenceDenied ¶
func (p *UsbManagerProxy) RemoveAccessoryPackagesFromPreferenceDenied( ctx context.Context, device UsbAccessory, packageNames []string, user os.UserHandle, ) error
func (*UsbManagerProxy) RemoveDevicePackagesFromPreferenceDenied ¶
func (p *UsbManagerProxy) RemoveDevicePackagesFromPreferenceDenied( ctx context.Context, device UsbDevice, packageNames []string, user os.UserHandle, ) error
func (*UsbManagerProxy) RequestAccessoryPermission ¶
func (p *UsbManagerProxy) RequestAccessoryPermission( ctx context.Context, accessory UsbAccessory, packageName string, pi app.PendingIntent, ) error
func (*UsbManagerProxy) RequestDevicePermission ¶
func (p *UsbManagerProxy) RequestDevicePermission( ctx context.Context, device UsbDevice, packageName string, pi app.PendingIntent, ) error
func (*UsbManagerProxy) ResetUsbGadget ¶
func (p *UsbManagerProxy) ResetUsbGadget( ctx context.Context, ) error
func (*UsbManagerProxy) ResetUsbPort ¶
func (p *UsbManagerProxy) ResetUsbPort( ctx context.Context, portId string, operationId int32, callback IUsbOperationInternal, ) error
func (*UsbManagerProxy) SetAccessoryPackage ¶
func (p *UsbManagerProxy) SetAccessoryPackage( ctx context.Context, accessory UsbAccessory, packageName string, ) error
func (*UsbManagerProxy) SetAccessoryPersistentPermission ¶
func (p *UsbManagerProxy) SetAccessoryPersistentPermission( ctx context.Context, accessory UsbAccessory, uid int32, user os.UserHandle, shouldBeGranted bool, ) error
func (*UsbManagerProxy) SetCurrentFunction ¶
func (*UsbManagerProxy) SetCurrentFunctions ¶
func (*UsbManagerProxy) SetDevicePackage ¶
func (*UsbManagerProxy) SetDevicePersistentPermission ¶
func (p *UsbManagerProxy) SetDevicePersistentPermission( ctx context.Context, device UsbDevice, uid int32, user os.UserHandle, shouldBeGranted bool, ) error
func (*UsbManagerProxy) SetPortRoles ¶
func (*UsbManagerProxy) SetScreenUnlockedFunctions ¶
func (p *UsbManagerProxy) SetScreenUnlockedFunctions( ctx context.Context, functions int64, ) error
func (*UsbManagerProxy) SetUsbDeviceConnectionHandler ¶
func (p *UsbManagerProxy) SetUsbDeviceConnectionHandler( ctx context.Context, usbDeviceConnectionHandler content.ComponentName, ) error
func (*UsbManagerProxy) UnregisterForDisplayPortEvents ¶
func (p *UsbManagerProxy) UnregisterForDisplayPortEvents( ctx context.Context, listener IDisplayPortAltModeInfoListener, ) error
type UsbManagerStub ¶
type UsbManagerStub struct {
Impl IUsbManager
Transport binder.VersionAwareTransport
}
UsbManagerStub dispatches incoming binder transactions to a typed IUsbManager implementation.
func (*UsbManagerStub) Descriptor ¶
func (s *UsbManagerStub) Descriptor() string
func (*UsbManagerStub) OnTransaction ¶
func (s *UsbManagerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type UsbOperationInternalProxy ¶
func NewUsbOperationInternalProxy ¶
func NewUsbOperationInternalProxy( remote binder.IBinder, ) *UsbOperationInternalProxy
func (*UsbOperationInternalProxy) AsBinder ¶
func (p *UsbOperationInternalProxy) AsBinder() binder.IBinder
func (*UsbOperationInternalProxy) OnOperationComplete ¶
func (p *UsbOperationInternalProxy) OnOperationComplete( ctx context.Context, status int32, ) error
type UsbOperationInternalStub ¶
type UsbOperationInternalStub struct {
Impl IUsbOperationInternal
Transport binder.VersionAwareTransport
}
UsbOperationInternalStub dispatches incoming binder transactions to a typed IUsbOperationInternal implementation.
func (*UsbOperationInternalStub) Descriptor ¶
func (s *UsbOperationInternalStub) Descriptor() string
func (*UsbOperationInternalStub) OnTransaction ¶
func (s *UsbOperationInternalStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type UsbPortStatus ¶
type UsbPortStatus struct {
CurrentMode int32
CurrentPowerRole int32
CurrentDataRole int32
SupportedRoleCombinations int32
ContaminantProtectionStatus int32
ContaminantDetectionStatus int32
UsbDataStatus int32
PowerTransferLimited bool
PowerBrickConnectionStatus int32
PlugState int32
}
func (*UsbPortStatus) MarshalParcel ¶
func (s *UsbPortStatus) MarshalParcel( p *parcel.Parcel, ) error
func (*UsbPortStatus) UnmarshalParcel ¶
func (s *UsbPortStatus) UnmarshalParcel( p *parcel.Parcel, ) error
type UsbProxy ¶
func NewUsbProxy ¶
func (*UsbProxy) EnableContaminantPresenceDetection ¶
func (*UsbProxy) EnableUsbData ¶
func (*UsbProxy) EnableUsbDataWhileDocked ¶
func (*UsbProxy) LimitPowerTransfer ¶
func (*UsbProxy) QueryPortStatus ¶
func (*UsbProxy) ResetUsbPort ¶
func (*UsbProxy) SetCallback ¶
func (p *UsbProxy) SetCallback( ctx context.Context, callback IUsbCallback, ) error
type UsbSerialReaderProxy ¶
func NewUsbSerialReaderProxy ¶
func NewUsbSerialReaderProxy( remote binder.IBinder, ) *UsbSerialReaderProxy
func (*UsbSerialReaderProxy) AsBinder ¶
func (p *UsbSerialReaderProxy) AsBinder() binder.IBinder
type UsbSerialReaderStub ¶
type UsbSerialReaderStub struct {
Impl IUsbSerialReader
Transport binder.VersionAwareTransport
}
UsbSerialReaderStub dispatches incoming binder transactions to a typed IUsbSerialReader implementation.
func (*UsbSerialReaderStub) Descriptor ¶
func (s *UsbSerialReaderStub) Descriptor() string
func (*UsbSerialReaderStub) OnTransaction ¶
func (s *UsbSerialReaderStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type UsbStub ¶
type UsbStub struct {
Impl IUsb
Transport binder.VersionAwareTransport
}
UsbStub dispatches incoming binder transactions to a typed IUsb implementation.
func (*UsbStub) Descriptor ¶
Source Files
¶
- altmodedata.displayportaltmodedata.go
- altmodedata.go
- compliancewarning.go
- contaminantdetectionstatus.go
- contaminantprotectionmode.go
- contaminantprotectionstatus.go
- displayportaltmodeinfo.go
- displayportaltmodepinassignment.go
- displayportaltmodestatus.go
- get_usb.go
- idisplayportaltmodeinfolistener.go
- iusb.go
- iusbcallback.go
- iusbmanager.go
- iusboperationinternal.go
- iusbserialreader.go
- linktrainingstatus.go
- parcelableusbport.go
- plugorientation.go
- portdatarole.go
- portmode.go
- portpowerrole.go
- portrole.go
- portstatus.go
- powerbrickstatus.go
- status.go
- usbaccessory.go
- usbdatastatus.go
- usbdevice.go
- usbendpoint.go
- usbinterface.go
- usbportstatus.go