From: Jason Monk Date: Thu, 10 Sep 2015 14:36:58 +0000 (-0400) Subject: Include the usb data mode regardless of data role X-Git-Tag: android-x86-6.0-r1~75 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d3c60afe5267eb614b9c0a99b797e6bbb51de16f;p=android-x86%2Fpackages-apps-Settings.git Include the usb data mode regardless of data role Turns out there are valid data modes in host mode (like midi). Need to allow these through for the dialog to set the proper current state. Bug: 23905770 Change-Id: I7a37ad95ccaf18f211d2b2d330c7f1d7af4cfc16 --- diff --git a/src/com/android/settings/deviceinfo/UsbBackend.java b/src/com/android/settings/deviceinfo/UsbBackend.java index 846d6e3fdd..210e0a0679 100644 --- a/src/com/android/settings/deviceinfo/UsbBackend.java +++ b/src/com/android/settings/deviceinfo/UsbBackend.java @@ -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(); }