Home
last modified time | relevance | path

Searched refs:powerRole (Results 1 – 7 of 7) sorted by relevance

/frameworks/base/core/java/android/hardware/usb/
DUsbPort.java449 public void setRoles(@UsbPortStatus.UsbPowerRole int powerRole, in setRoles() argument
451 UsbPort.checkRoles(powerRole, dataRole); in setRoles()
453 mUsbManager.setPortRoles(this, powerRole, dataRole); in setRoles()
630 public static int combineRolesAsBit(int powerRole, int dataRole) { in combineRolesAsBit() argument
631 checkRoles(powerRole, dataRole); in combineRolesAsBit()
632 final int index = ((powerRole - POWER_ROLE_OFFSET) * NUM_DATA_ROLES) + dataRole; in combineRolesAsBit()
777 final int powerRole = (index / NUM_DATA_ROLES + POWER_ROLE_OFFSET); in roleCombinationsToString() local
784 result.append(powerRoleToString(powerRole)); in roleCombinationsToString()
856 public static void checkMode(int powerRole) { in checkMode() argument
857 Preconditions.checkArgumentInRange(powerRole, Constants.PortMode.NONE, in checkMode()
[all …]
DUsbPortStatus.java573 public boolean isRoleCombinationSupported(@UsbPowerRole int powerRole, in isRoleCombinationSupported() argument
576 UsbPort.combineRolesAsBit(powerRole, dataRole)) != 0; in isRoleCombinationSupported()
DIUsbManager.aidl194 void setPortRoles(in String portId, int powerRole, int dataRole); in setPortRoles() argument
/frameworks/base/core/java/com/android/internal/usb/
DDumpUtils.java191 long id, int powerRole) { in writePowerRole() argument
193 dump.write(idName, id, powerRole); in writePowerRole()
195 dump.write(idName, id, UsbPort.powerRoleToString(powerRole)); in writePowerRole()
240 int powerRole = (index / Constants.PortDataRole.NUM_DATA_ROLES in writePortStatus() local
247 powerRole); in writePortStatus()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbService.java834 public void setPortRoles(String portId, int powerRole, int dataRole) { in setPortRoles() argument
836 UsbPort.checkRoles(powerRole, dataRole); in setPortRoles()
842 mPortManager.setPortRoles(portId, powerRole, dataRole, null); in setPortRoles()
1121 final int powerRole; in dump() local
1124 powerRole = POWER_ROLE_SOURCE; in dump()
1127 powerRole = POWER_ROLE_SINK; in dump()
1130 powerRole = 0; in dump()
1152 mPortManager.setPortRoles(portId, powerRole, dataRole, pw); in dump()
1221 final int powerRole; in dump() local
1225 powerRole = POWER_ROLE_SOURCE; in dump()
[all …]
DUsbPortManager.java794 int powerRole, boolean canChangePowerRole, in connectSimulatedPort() argument
803 if (mode == 0 || powerRole == 0 || dataRole == 0) { in connectSimulatedPort()
817 + ", powerRole=" + UsbPort.powerRoleToString(powerRole) in connectSimulatedPort()
823 portInfo.currentPowerRole = powerRole; in connectSimulatedPort()
/frameworks/base/services/usb/java/com/android/server/usb/hal/port/
DUsbPortHal.java131 public void switchPowerRole(String portName, @HalUsbPowerRole int powerRole, in switchPowerRole() argument