Fix missing combination check SINK/DEVICE

While checking for possible role combinations, the SINK/HOST combination
seems to be mistakenly checked twice intead of SINK/DEVICE.
This CL fixes this. The code now checks for:
1. source & host
2. sink & host
3. source & device
4. sink & device

Bug: 119142682
Change-Id: I5e652fbf9313bd2c122fe728d58e577085632253
Merged-In: I5e652fbf9313bd2c122fe728d58e577085632253
This commit is contained in:
Badhri Jagan Sridharan
2019-03-25 11:02:44 -07:00
parent 96cf453355
commit ac294d7ce3

View File

@@ -855,7 +855,7 @@ public class UsbDeviceManager implements ActivityManagerInternal.ScreenObserver
&& status.isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE,
UsbPort.DATA_ROLE_DEVICE)
&& status.isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK,
UsbPort.DATA_ROLE_HOST);
UsbPort.DATA_ROLE_DEVICE);
args.recycle();
updateUsbNotification(false);