Communication rebuild.

This commit is contained in:
dxl
2020-04-13 18:38:48 +08:00
parent bd9feeb9d5
commit ba9e7b78b6
2 changed files with 5 additions and 2 deletions
@@ -74,7 +74,8 @@ public abstract class UsbBulkTransferRaw implements DriverInterface<String, UsbM
break;
case UsbManager.ACTION_USB_DEVICE_DETACHED:
mCallback.onDetach(name);
if (mCallback != null)
mCallback.onDetach(name);
break;
}
}
@@ -83,7 +84,8 @@ public abstract class UsbBulkTransferRaw implements DriverInterface<String, UsbM
private void initAndCall(String name) {
if (init()) {
mCallback.onAttach(name);
if (mCallback != null)
mCallback.onAttach(name);
}
}
@@ -6,6 +6,7 @@ import cn.dxl.com.Communication;
import cn.dxl.com.DeviceChecker;
public class EmptyDeivce extends DeviceChecker {
public EmptyDeivce(Communication communication) {
super(communication);
}