Home
last modified time | relevance | path

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

/frameworks/base/core/java/android/hardware/usb/
DUsbPort.java127 public static int combineRolesAsBit(int powerRole, int dataRole) { in combineRolesAsBit() argument
128 checkRoles(powerRole, dataRole); in combineRolesAsBit()
129 final int index = powerRole * NUM_DATA_ROLES + dataRole; in combineRolesAsBit()
186 final int powerRole = index / NUM_DATA_ROLES; in roleCombinationsToString() local
193 result.append(powerRoleToString(powerRole)); in roleCombinationsToString()
203 public static void checkRoles(int powerRole, int dataRole) { in checkRoles() argument
204 Preconditions.checkArgumentInRange(powerRole, 0, POWER_ROLE_SINK, "powerRole"); in checkRoles()
DUsbPortStatus.java93 public boolean isRoleCombinationSupported(int powerRole, int dataRole) { in isRoleCombinationSupported() argument
95 UsbPort.combineRolesAsBit(powerRole, dataRole)) != 0; in isRoleCombinationSupported()
DUsbManager.java602 public void setPortRoles(UsbPort port, int powerRole, int dataRole) { in setPortRoles() argument
604 UsbPort.checkRoles(powerRole, dataRole); in setPortRoles()
607 mService.setPortRoles(port.getId(), powerRole, dataRole); in setPortRoles() local
DIUsbManager.aidl118 void setPortRoles(in String portId, int powerRole, int dataRole); in setPortRoles() argument
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbService.java372 public void setPortRoles(String portId, int powerRole, int dataRole) { in setPortRoles() argument
374 UsbPort.checkRoles(powerRole, dataRole); in setPortRoles()
380 mPortManager.setPortRoles(portId, powerRole, dataRole, null); in setPortRoles()
420 final int powerRole; in dump() local
423 powerRole = UsbPort.POWER_ROLE_SOURCE; in dump()
426 powerRole = UsbPort.POWER_ROLE_SINK; in dump()
429 powerRole = 0; in dump()
451 mPortManager.setPortRoles(portId, powerRole, dataRole, pw); in dump()
500 final int powerRole; in dump() local
504 powerRole = UsbPort.POWER_ROLE_SOURCE; in dump()
[all …]
DUsbPortManager.java298 int powerRole, boolean canChangePowerRole, in connectSimulatedPort() argument
307 if (mode == 0 || powerRole == 0 || dataRole == 0) { in connectSimulatedPort()
321 + ", powerRole=" + UsbPort.powerRoleToString(powerRole) in connectSimulatedPort()
327 portInfo.mCurrentPowerRole = powerRole; in connectSimulatedPort()