lzw
2024-02-28 ea99626dc3325acd92d17a1ff784fc9594af7871
app/src/main/java/com/fwupgrade/saymanss/deviceplug/UstorageDeviceInstance.java
@@ -62,7 +62,7 @@
    /**
     * 尝试是否有连接设备(OTG)
     */
    public void tryAttcheDeviceHandle(Context context, IUsbDevicePlugDelegate iUsbDevicePlugDelegate) {
    public int tryAttcheDeviceHandle(Context context, IUsbDevicePlugDelegate iUsbDevicePlugDelegate) {
        Log.d("fwup","tryAttcheDeviceHandle: ");
        this.iUsbDevicePlugDelegate = iUsbDevicePlugDelegate;
        mUsbManager = (UsbManager) context.getSystemService(USB_SERVICE);
@@ -76,10 +76,14 @@
        }*/
        ArrayList<UsbDevice> devices = acceptOTGDeviceInfo(mUsbManager);
        if (devices==null || devices.size()==0){
            Log.i("fwup","devices==null");
            return 1;
        }
        for (UsbDevice dev: devices) {
            acceptLicense(context, dev);
        }
        return 0;
    }
    //<<<--------------------------------------- Usb 相关处理--------------------------------------------