yang 3 mesiacov pred
rodič
commit
6f97f18829

+ 1 - 2
app/src/main/java/com/hanghui/senic/activity/MainActivity.java

@@ -289,8 +289,7 @@ public class MainActivity extends BaseActivity {
         public void updateView(int code, String msg) {
             int alreadyInitHardwareNumber = DeviceInitManager.getInstance().getAlreadyInitHardwareNum();
             AppHandler.getHandler().postDelayed(startHardwareRunnable,alreadyInitHardwareNumber * 2000);
-            alreadyInitHardwareNumber++;
-            DeviceInitManager.getInstance().setAlreadyInitHardwareNum(alreadyInitHardwareNumber);
+            DeviceInitManager.getInstance().setAlreadyInitHardwareNumAddOne();
         }
     };
 

+ 11 - 0
app/src/main/java/com/hanghui/senic/common/DeviceInitManager.java

@@ -42,6 +42,16 @@ public class DeviceInitManager {
     //已经进行初始化了多少个外设(身份证、二维码、IC卡等),注意可能初始化成功,可能初始化失败
     private int alreadyInitHardwareNum = 0;
 
+    /**
+     * alreadyInitHardwareNum + 1
+     *
+     */
+    public void setAlreadyInitHardwareNumAddOne() {
+        this.alreadyInitHardwareNum ++;
+    }
+
+
+
     public int getAlreadyInitHardwareNum() {
         return alreadyInitHardwareNum;
     }
@@ -236,6 +246,7 @@ public class DeviceInitManager {
     }
 
 
+
     public DeviceInitCallback getDeviceInitCallback() {
         return deviceInitCallback;
     }