Merge "Don\'t close USB type notification when USB is connected to USB devices." into nyc-dev
am: 98607d4
* commit '98607d444903f5c74fe190f65800a5679b312c4e':
Don't close USB type notification when USB is connected to USB devices.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user