Merge "Don\'t close USB type notification when USB is connected to USB devices." into nyc-dev am: 98607d4

am: 28fa685

* commit '28fa685ef3bdd1a5ea399172258bed15d97d1dbb':
  Don't close USB type notification when USB is connected to USB devices.
This commit is contained in:
Daichi Hirono
2016-03-24 02:53:04 +00:00
committed by android-build-merger

View File

@@ -68,7 +68,9 @@ public class UsbModeChooserActivity extends Activity {
String action = intent.getAction();
if (UsbManager.ACTION_USB_STATE.equals(action)) {
boolean connected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false);
if (!connected) {
boolean hostConnected =
intent.getBooleanExtra(UsbManager.USB_HOST_CONNECTED, false);
if (!connected && !hostConnected) {
mDialog.dismiss();
}
}