Permalink
Browse files

Don't update UI or show a toast when changing the ADB state.

Change-Id: I16f3aa2fc50222dceff7e3f78276be56dd5b8229
  • Loading branch information...
1 parent 75d307a commit c0026b12792a8b10fb339c69998ca2ff6e4841ce @maniac103 maniac103 committed Aug 24, 2011
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/com/motorola/usb/UsbService.java
View
13 src/com/motorola/usb/UsbService.java
@@ -442,9 +442,11 @@ private synchronized void handleUsbEvent(int event) {
currentMode = getCurrentUsbMode();
if (mIsSwitchFrom != USB_SWITCH_FROM_IDLE) {
- showConnectedToast(currentMode);
- setUsbConnectionNotificationVisibility(true, false);
- enableInternalDataConnectivity(currentMode != USB_MODE_MODEM);
+ if (mIsSwitchFrom != USB_SWITCH_FROM_ADB) {
+ showConnectedToast(currentMode);
+ setUsbConnectionNotificationVisibility(true, false);
+ enableInternalDataConnectivity(currentMode != USB_MODE_MODEM);
+ }
emitReconfigurationIntent(true);
updateUsbStateFile(true, currentMode);
}
@@ -488,9 +490,8 @@ private synchronized void handleUsbEvent(int event) {
if (mIsSwitchFrom == USB_SWITCH_FROM_UI
|| mIsSwitchFrom == USB_SWITCH_FROM_AT_CMD
- || mIsSwitchFrom == USB_SWITCH_FROM_USBD) {
- mUsbListener.sendUsbModeSwitchCmd(getSwitchCommand(mNewUsbMode));
- } else if (mIsSwitchFrom == USB_SWITCH_FROM_ADB) {
+ || mIsSwitchFrom == USB_SWITCH_FROM_USBD
+ || mIsSwitchFrom == USB_SWITCH_FROM_ADB) {
mUsbListener.sendUsbModeSwitchCmd(getSwitchCommand(currentMode));
}
}

0 comments on commit c0026b1

Please sign in to comment.