diff --git a/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java b/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java index d2aaa0f..8bc1d6f 100644 --- a/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java +++ b/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java @@ -176,7 +176,7 @@ public class USBCameraManager{ public void restartUSBCamera(CameraViewInterface cameraView,final OnPreviewListener mPreviewListener){ if(mCtrlBlock == null || cameraView == null) - new Throwable("mCtrlBlock or cameraView is null---jiangdongguo"); + throw new NullPointerException("mCtrlBlock or cameraView is null,please connected to camera"); // 创建Camera管理线程 createUVCCamera(cameraView); // 创建Camera @@ -253,7 +253,7 @@ public class USBCameraManager{ } // 返回USB设备列表 - private List getUsbDeviceList(){ + public List getUsbDeviceList(){ List deviceFilters = DeviceFilter.getDeviceFilters(mActivity.getApplicationContext(), R.xml.device_filter); if(mUSBMonitor == null || deviceFilters == null) return null;