|
@@ -37,53 +37,6 @@ public class DeviceInitManager {
|
|
|
this.alreadyInitHardwareNum = alreadyInitHardwareNum;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- String selectHardwareToString = "";
|
|
|
- int selectHardwareToInt = 0;
|
|
|
- /**
|
|
|
- * @param selectHardware 文字赋值释义:
|
|
|
- * 0 "身份证阅读器初始化成功";
|
|
|
- * 1 "身份证阅读器初始化失败,请检查模块是否正常连接";
|
|
|
- * 2 "二维码读头初始化成功";
|
|
|
- * 3 "二维码读头初始化失败,请检查模块是否正常连接";
|
|
|
- * 4 "护照机初始化成功";
|
|
|
- * 5 "护照机初始化失败,请检查模块是否正常连接,并重启设备";
|
|
|
- * 6 "IC卡阅读器初始化成功";
|
|
|
- * 7 "IC卡阅读器初始化失败,请检查模块是否正常连接";
|
|
|
- */
|
|
|
- public void setSelectHardwareToString(int selectHardware){
|
|
|
- selectHardwareToInt = selectHardware;
|
|
|
- switch (selectHardware){
|
|
|
- case Constants.Code_hardware_idCard_succeed:
|
|
|
- selectHardwareToString = "身份证阅读器初始化成功";
|
|
|
- break;
|
|
|
- case Constants.Code_hardware_idCard_fail:
|
|
|
- selectHardwareToString = "身份证阅读器初始化失败,请检查模块是否正常连接";
|
|
|
- break;
|
|
|
- case Constants.Code_hardware_qrCode_succeed:
|
|
|
- selectHardwareToString = "二维码读头初始化成功";
|
|
|
- break;
|
|
|
- case Constants.Code_hardware_qrCode_fail:
|
|
|
- selectHardwareToString = "二维码读头初始化失败,请检查模块是否正常连接";
|
|
|
- break;
|
|
|
- case Constants.Code_hardware_passport_succeed:
|
|
|
- selectHardwareToString = "护照机初始化成功";
|
|
|
- break;
|
|
|
- case Constants.Code_hardware_passport_fail:
|
|
|
- selectHardwareToString = "护照机初始化失败,请检查模块是否正常连接,并重启设备";
|
|
|
- break;
|
|
|
- case Constants.Code_hardware_icCard_succeed:
|
|
|
- selectHardwareToString = "IC卡阅读器初始化成功";
|
|
|
- break;
|
|
|
- case Constants.Code_hardware_icCard_fail:
|
|
|
- selectHardwareToString = "IC卡阅读器初始化失败,请检查模块是否正常连接";
|
|
|
- break;
|
|
|
- default:
|
|
|
- selectHardwareToString = "";
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 二维码读头是否启动成功
|
|
|
*/
|
|
@@ -94,12 +47,13 @@ public class DeviceInitManager {
|
|
|
}
|
|
|
isOpenFirstQRCode = false;
|
|
|
if (isStartQRCode){
|
|
|
- DeviceInitManager.getInstance().setSelectHardwareToString(Constants.Code_hardware_qrCode_succeed);
|
|
|
+ deviceInitCallback.updateView(Constants.Code_hardware_qrCode_succeed,"二维码读头初始化成功");
|
|
|
}else {
|
|
|
- DeviceInitManager.getInstance().setSelectHardwareToString(Constants.Code_hardware_qrCode_fail);
|
|
|
+ deviceInitCallback.updateView(Constants.Code_hardware_qrCode_fail,"二维码读头初始化失败,请检查模块是否正常连接");
|
|
|
}
|
|
|
- deviceInitCallback.updateView(Constants.Code_DeviceInitCallback_HardwareQRCode,"二维码硬件启动");
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 身份证阅读器硬件启动是否成功
|
|
|
*/
|
|
@@ -110,14 +64,15 @@ public class DeviceInitManager {
|
|
|
}
|
|
|
isOpenFirstIDCard = false;
|
|
|
if (isStartIDCard){
|
|
|
- DeviceInitManager.getInstance().setSelectHardwareToString(Constants.Code_hardware_idCard_succeed);
|
|
|
+ deviceInitCallback.updateView(Constants.Code_hardware_idCard_succeed,"身份证阅读器初始化成功");
|
|
|
}else {
|
|
|
- DeviceInitManager.getInstance().setSelectHardwareToString(Constants.Code_hardware_idCard_fail);
|
|
|
+ deviceInitCallback.updateView(Constants.Code_hardware_idCard_fail,"身份证阅读器初始化失败,请检查模块是否正常连接");
|
|
|
}
|
|
|
- deviceInitCallback.updateView(Constants.Code_DeviceInitCallback_HardwareIDCard,"身份证阅读器硬件启动");
|
|
|
+
|
|
|
}
|
|
|
/**
|
|
|
* IC卡硬件启动是否成功
|
|
|
+ * isDXAllOneIDCard 判断是否是东信多合一
|
|
|
*/
|
|
|
boolean isOpenFirstICCard = true;
|
|
|
public void setHardwareICCard(boolean isStartICCard) {
|
|
@@ -126,11 +81,11 @@ public class DeviceInitManager {
|
|
|
}
|
|
|
isOpenFirstICCard = false;
|
|
|
if (isStartICCard){
|
|
|
- DeviceInitManager.getInstance().setSelectHardwareToString(Constants.Code_hardware_icCard_succeed);
|
|
|
+ deviceInitCallback.updateView(Constants.Code_hardware_icCard_succeed,"IC卡阅读器初始化成功");
|
|
|
}else {
|
|
|
- DeviceInitManager.getInstance().setSelectHardwareToString(Constants.Code_hardware_icCard_fail);
|
|
|
+ deviceInitCallback.updateView(Constants.Code_hardware_icCard_fail,"IC卡阅读器初始化失败,请检查模块是否正常连接");
|
|
|
}
|
|
|
- deviceInitCallback.updateView(Constants.Code_DeviceInitCallback_HardwareICCard,"IC卡硬件启动");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void setHardwareStart() {
|
|
@@ -139,15 +94,6 @@ public class DeviceInitManager {
|
|
|
isOpenFirstICCard = true;
|
|
|
}
|
|
|
|
|
|
- public String getSelectHardwareToString(){
|
|
|
- return selectHardwareToString;
|
|
|
- }
|
|
|
- public int getSelectHardwareToInt(){
|
|
|
- return selectHardwareToInt;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public DeviceInitCallback getDeviceInitCallback() {
|
|
|
return deviceInitCallback;
|
|
|
}
|