am 72fecf9f: am d3c60afe: Include the usb data mode regardless of data role

* commit '72fecf9f0a640554d9c00e087e4cb2ce8fea3d77':
  Include the usb data mode regardless of data role
This commit is contained in:
Jason Monk
2015-09-10 20:41:37 +00:00
committed by Android Git Automerger

View File

@@ -71,8 +71,7 @@ public class UsbBackend {
if (mPort != null) {
int power = mPortStatus.getCurrentPowerRole() == UsbPort.POWER_ROLE_SOURCE
? MODE_POWER_SOURCE : MODE_POWER_SINK;
return power | (mPortStatus.getCurrentDataRole() == UsbPort.DATA_ROLE_DEVICE
? getUsbDataMode() : MODE_DATA_NONE);
return power | getUsbDataMode();
}
return MODE_POWER_SINK | getUsbDataMode();
}