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;
發佈了27 篇原創文章 · 獲贊 2 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章