|
@@ -29,14 +29,15 @@ public class USBroadcastReceiver extends BroadcastReceiver {
|
|
|
if (ConfigManager.isDeviceQRCode(usbDevice) == 0){
|
|
|
AppLogUtils.e(true, "USB广播信号", "USB拔出广播信号已接收,监测到该类型为二维码USB");
|
|
|
//东信多合一阅读器的身份证和二维码是在同一个设备上,因此此时也需要初始化东信多合一的身份证阅读器DXAllInoneIDCardcontroller
|
|
|
- if (ConfigManager.getAuthenticationBean().getData().get(0).isUseQrcode()
|
|
|
- && ConfigManager.getAuthenticationBean().getData().get(0).getQrCodeReaderBrand() == 6) {
|
|
|
- IDCardControllerManager.init(9);
|
|
|
- } else {
|
|
|
- QRCodeController.getInstance().init();
|
|
|
- }
|
|
|
- if (usBroadcastCallback != null){
|
|
|
- usBroadcastCallback.updateView(Constants.Code_USBroadcastCallback_QRCodeSucceed,"二维码USB连接成功");
|
|
|
+ if (ConfigManager.getAuthenticationBean().getData().get(0).isUseQrcode()){
|
|
|
+ if (ConfigManager.getAuthenticationBean().getData().get(0).getQrCodeReaderBrand() == 6) {
|
|
|
+ IDCardControllerManager.init(9);
|
|
|
+ } else {
|
|
|
+ QRCodeController.getInstance().init();
|
|
|
+ }
|
|
|
+ if (usBroadcastCallback != null){
|
|
|
+ usBroadcastCallback.updateView(Constants.Code_USBroadcastCallback_QRCodeSucceed,"二维码USB连接成功");
|
|
|
+ }
|
|
|
}
|
|
|
}else if (ConfigManager.isDeviceQRCode(usbDevice) == 1){//东信多合一插入特殊处理
|
|
|
IDCardControllerManager.init(9);
|
|
@@ -71,8 +72,7 @@ public class USBroadcastReceiver extends BroadcastReceiver {
|
|
|
if (ConfigManager.isDeviceQRCode(usbDevice) == 0){
|
|
|
AppLogUtils.e(true, "USB广播信号", "USB拔出广播信号已接收,监测到该类型为二维码USB");
|
|
|
//东信多合一阅读器的身份证和二维码是在同一个设备上,因此此时也需要初始化东信多合一的身份证阅读器DXAllInoneIDCardcontroller
|
|
|
- if (ConfigManager.getAuthenticationBean().getData().get(0).isUseQrcode()
|
|
|
- && ConfigManager.getAuthenticationBean().getData().get(0).getQrCodeReaderBrand() == 6) {
|
|
|
+ if (ConfigManager.getAuthenticationBean().getData().get(0).getQrCodeReaderBrand() == 6) {
|
|
|
IDCardControllerManager.destroy();
|
|
|
} else {
|
|
|
QRCodeController.getInstance().destroy();
|
|
@@ -80,7 +80,6 @@ public class USBroadcastReceiver extends BroadcastReceiver {
|
|
|
if (usBroadcastCallback != null){
|
|
|
usBroadcastCallback.updateView(Constants.Code_USBroadcastCallback_QRCodeFail,"二维码USB连接断开");
|
|
|
}
|
|
|
-
|
|
|
}else if (ConfigManager.isDeviceQRCode(usbDevice) == 1){//东信多合一拔出特殊处理
|
|
|
IDCardControllerManager.destroy();
|
|
|
if (usBroadcastCallback != null){
|
|
@@ -88,9 +87,11 @@ public class USBroadcastReceiver extends BroadcastReceiver {
|
|
|
}
|
|
|
}else {
|
|
|
AppLogUtils.e(true, "USB广播信号", "USB拔出广播信号已接收,监测到该类型为身份证阅读器USB");
|
|
|
- IDCardControllerManager.destroy();
|
|
|
- if (usBroadcastCallback != null){
|
|
|
- usBroadcastCallback.updateView(Constants.Code_USBroadcastCallback_IDCardFail,"身份证USB连接断开");
|
|
|
+ if (ConfigManager.getAuthenticationBean().getData().get(0).isUseIdcard()){
|
|
|
+ IDCardControllerManager.destroy();
|
|
|
+ if (usBroadcastCallback != null){
|
|
|
+ usBroadcastCallback.updateView(Constants.Code_USBroadcastCallback_IDCardFail,"身份证USB连接断开");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|