framework层bug--USB tethering is not getting enabled

问题:USB tethering is not getting enabled.
步骤:Settings-> More->Tethering & portable hotspot->USB tethering
//修改代码路径
//当启用USB数据连线,先断开uevent,从kernel处接受数据。这但是时间太短uevent接收不到。因此,延时断开uevent到1.5秒。
//frameworks/base/services/usb/java/com/android/server/usb/UsbDeviceManager.java
   private static final int MSG_USER_SWITCHED = 5;
    private static final int MSG_SET_USB_DATA_UNLOCKED = 6;
    private static final int MSG_UPDATE_USER_RESTRICTIONS = 7;
    private static final int MSG_UPDATE_HOST_STATE = 8;

    private static final int AUDIO_MODE_SOURCE = 1;

    // Delay for debouncing USB disconnects.
    // We often get rapid connect/disconnect events when enabling USB functions,
    // which need debouncing.
    private static final int UPDATE_DELAY = 1000;//修改成private static final int UPDATE_DELAY = 1500;

你可能感兴趣的:(framework层bug--USB tethering is not getting enabled)