|
@@ -98,27 +98,27 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
String devName = DeviceConnectManager.getInstance().getDevName();
|
|
String devName = DeviceConnectManager.getInstance().getDevName();
|
|
switch (msg.what) {
|
|
switch (msg.what) {
|
|
case DeviceConnectManager.MESSAGE_CONNECTED:
|
|
case DeviceConnectManager.MESSAGE_CONNECTED:
|
|
- AppLogUtils.e(devName + "新中新身份证阅读器连接成功");
|
|
|
|
|
|
+ AppLogUtils.i(devName + "新中新身份证阅读器连接成功");
|
|
idCardInitResultCallback.onIDCardInitSuccess();
|
|
idCardInitResultCallback.onIDCardInitSuccess();
|
|
break;
|
|
break;
|
|
case DeviceConnectManager.MESSAGE_CONNECTING_DEVICE:
|
|
case DeviceConnectManager.MESSAGE_CONNECTING_DEVICE:
|
|
- AppLogUtils.e(devName + "新中新身份证阅读器正在连接");
|
|
|
|
|
|
+ AppLogUtils.i(devName + "新中新身份证阅读器正在连接");
|
|
break;
|
|
break;
|
|
case DeviceConnectManager.MESSAGE_CONNECTFAILED:
|
|
case DeviceConnectManager.MESSAGE_CONNECTFAILED:
|
|
- AppLogUtils.e(devName + "新中新身份证阅读器连接失败,尝试重连");
|
|
|
|
|
|
+ AppLogUtils.i(devName + "新中新身份证阅读器连接失败,尝试重连");
|
|
// idCardInitResultCallback.onIDCardInitError("-1",devName + "新中新身份证阅读器连接失败,尝试重连");
|
|
// idCardInitResultCallback.onIDCardInitError("-1",devName + "新中新身份证阅读器连接失败,尝试重连");
|
|
|
|
|
|
retryCount++;
|
|
retryCount++;
|
|
- AppLogUtils.e("retryCount--"+retryCount);
|
|
|
|
- AppLogUtils.e("retryMaxCount--"+retryMaxCount);
|
|
|
|
|
|
+ AppLogUtils.i("retryCount--"+retryCount);
|
|
|
|
+ AppLogUtils.i("retryMaxCount--"+retryMaxCount);
|
|
|
|
|
|
if(retryCount >= retryMaxCount){
|
|
if(retryCount >= retryMaxCount){
|
|
- AppLogUtils.e(devName + "新中新身份证阅读器连接失败回调");
|
|
|
|
|
|
+ AppLogUtils.i(devName + "新中新身份证阅读器连接失败回调");
|
|
idCardInitResultCallback.onIDCardInitError("-1",devName + "新中新身份证阅读器连接"+retryCount+"次后连接失败");
|
|
idCardInitResultCallback.onIDCardInitError("-1",devName + "新中新身份证阅读器连接"+retryCount+"次后连接失败");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- AppLogUtils.e("重连--");
|
|
|
|
|
|
+ AppLogUtils.i("重连--");
|
|
|
|
|
|
clearXzx();
|
|
clearXzx();
|
|
|
|
|
|
@@ -133,22 +133,22 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
closeRead();
|
|
closeRead();
|
|
break;
|
|
break;
|
|
case DeviceConnectManager.MESSAGE_RECONNECT_DEVICE:
|
|
case DeviceConnectManager.MESSAGE_RECONNECT_DEVICE:
|
|
- AppLogUtils.e(devName + "新中新身份证阅读器重新连接");
|
|
|
|
|
|
+ AppLogUtils.i(devName + "新中新身份证阅读器重新连接");
|
|
break;
|
|
break;
|
|
case DeviceConnectManager.MESSAGE_STOP_READCARD:
|
|
case DeviceConnectManager.MESSAGE_STOP_READCARD:
|
|
break;
|
|
break;
|
|
case IDCardReaderThread.MESSAGE_START_READ:
|
|
case IDCardReaderThread.MESSAGE_START_READ:
|
|
- AppLogUtils.e("新中新身份证阅读器开始读卡");
|
|
|
|
|
|
+ AppLogUtils.i("新中新身份证阅读器开始读卡");
|
|
ThreadPoolManager.getInstance().executeIOTask(new MyTimer());
|
|
ThreadPoolManager.getInstance().executeIOTask(new MyTimer());
|
|
// new MyTimer().start();
|
|
// new MyTimer().start();
|
|
break;
|
|
break;
|
|
case IDCardReaderThread.MESSAGE_DISPLAY_IDCARD:
|
|
case IDCardReaderThread.MESSAGE_DISPLAY_IDCARD:
|
|
- AppLogUtils.e("新中新身份证读卡信息 " + new Gson().toJson((IDCards) msg.obj));
|
|
|
|
|
|
+ AppLogUtils.i("新中新身份证读卡信息 " + new Gson().toJson((IDCards) msg.obj));
|
|
SendIdCard((IDCards) msg.obj);
|
|
SendIdCard((IDCards) msg.obj);
|
|
// overtime = allTime;
|
|
// overtime = allTime;
|
|
break;
|
|
break;
|
|
case IDCardReaderThread.MESSAGE_STOP_READ:
|
|
case IDCardReaderThread.MESSAGE_STOP_READ:
|
|
- AppLogUtils.e("新中新身份证阅读器停止读卡");
|
|
|
|
|
|
+ AppLogUtils.i("新中新身份证阅读器停止读卡");
|
|
break;
|
|
break;
|
|
case UPDATE_READER_STATUS:
|
|
case UPDATE_READER_STATUS:
|
|
AppLogUtils.i("身份证读卡耗时等信息 " + idCardReaderThread.getReadStatus());
|
|
AppLogUtils.i("身份证读卡耗时等信息 " + idCardReaderThread.getReadStatus());
|
|
@@ -177,11 +177,11 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
class MyTimer extends Thread {
|
|
class MyTimer extends Thread {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
- AppLogUtils.e("MyTimer");
|
|
|
|
|
|
+ AppLogUtils.i("MyTimer");
|
|
|
|
|
|
|
|
|
|
// isOverTime = localConfig.getScanIdCardOverTime();
|
|
// isOverTime = localConfig.getScanIdCardOverTime();
|
|
-// AppLogUtils.e("isOverTime--"+isOverTime);
|
|
|
|
|
|
+// AppLogUtils.i("isOverTime--"+isOverTime);
|
|
//
|
|
//
|
|
// if(isOverTime){
|
|
// if(isOverTime){
|
|
// isComplete = false;
|
|
// isComplete = false;
|
|
@@ -203,7 +203,7 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- AppLogUtils.e(e.toString());
|
|
|
|
|
|
+ AppLogUtils.i(e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -214,7 +214,7 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
|
|
|
|
|
|
|
|
if(idCardScanResultCallback == null){
|
|
if(idCardScanResultCallback == null){
|
|
- AppLogUtils.e("idCardScanResultCallback == null");
|
|
|
|
|
|
+ AppLogUtils.i("idCardScanResultCallback == null");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -225,7 +225,7 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- AppLogUtils.e("idcard:"+idcard.toString());
|
|
|
|
|
|
+ AppLogUtils.i("idcard:"+idcard.toString());
|
|
|
|
|
|
String type = "";
|
|
String type = "";
|
|
String name = "";
|
|
String name = "";
|
|
@@ -241,7 +241,7 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
Cardid = card.getIDCardNo();
|
|
Cardid = card.getIDCardNo();
|
|
}
|
|
}
|
|
|
|
|
|
- AppLogUtils.e(true, "mHandler_新中新身份证阅读器","新中新身份证读卡人员" + name
|
|
|
|
|
|
+ AppLogUtils.i(true, "mHandler_新中新身份证阅读器","新中新身份证读卡人员" + name
|
|
+ "新中新身份证读卡时间 " + idcard.getReadTime());
|
|
+ "新中新身份证读卡时间 " + idcard.getReadTime());
|
|
|
|
|
|
|
|
|
|
@@ -260,16 +260,16 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
try {
|
|
try {
|
|
Bitmap bmp = idcard.getPhoto();
|
|
Bitmap bmp = idcard.getPhoto();
|
|
if (bmp == null) {
|
|
if (bmp == null) {
|
|
- AppLogUtils.e("新中新身份证照片解码null ");
|
|
|
|
|
|
+ AppLogUtils.i("新中新身份证照片解码null ");
|
|
} else {
|
|
} else {
|
|
bmpPhotos = bitmapToString(bmp);
|
|
bmpPhotos = bitmapToString(bmp);
|
|
-// AppLogUtils.e("新中新身份证照片解码有值bmpPhotos--" +bmpPhotos);
|
|
|
|
- AppLogUtils.e("新中新身份证照片解码有值bmpPhotos--");
|
|
|
|
|
|
+// AppLogUtils.i("新中新身份证照片解码有值bmpPhotos--" +bmpPhotos);
|
|
|
|
+ AppLogUtils.i("新中新身份证照片解码有值bmpPhotos--");
|
|
idCardInfoBean.setPhotoBase64(bmpPhotos);
|
|
idCardInfoBean.setPhotoBase64(bmpPhotos);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- AppLogUtils.e("新中新身份证照片解码异常 "+e);
|
|
|
|
|
|
+ AppLogUtils.i("新中新身份证照片解码异常 "+e);
|
|
}
|
|
}
|
|
|
|
|
|
// 因为aidl解析图片出错,试试原始的wlt
|
|
// 因为aidl解析图片出错,试试原始的wlt
|
|
@@ -326,7 +326,7 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
|
|
|
|
private void init() {
|
|
private void init() {
|
|
|
|
|
|
- AppLogUtils.e("init");
|
|
|
|
|
|
+ AppLogUtils.i("init");
|
|
if(mHandler == null){
|
|
if(mHandler == null){
|
|
mHandler = new Handler();
|
|
mHandler = new Handler();
|
|
}
|
|
}
|
|
@@ -336,7 +336,7 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
// ThreadPoolManager.getInstance().executeIOTask(new Runnable() {
|
|
// ThreadPoolManager.getInstance().executeIOTask(new Runnable() {
|
|
// @Override
|
|
// @Override
|
|
// public void run() {
|
|
// public void run() {
|
|
-// AppLogUtils.e("initIDCard---idCardReaderThread");
|
|
|
|
|
|
+// AppLogUtils.i("initIDCard---idCardReaderThread");
|
|
|
|
|
|
idCardReaderThread = new IDCardReaderThread();
|
|
idCardReaderThread = new IDCardReaderThread();
|
|
idCardReaderThread.setActivityAndHandler(mActivity, mHandler);
|
|
idCardReaderThread.setActivityAndHandler(mActivity, mHandler);
|
|
@@ -369,8 +369,8 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
// return;
|
|
// return;
|
|
// }
|
|
// }
|
|
//
|
|
//
|
|
-// AppLogUtils.e("isComplete:"+isComplete);
|
|
|
|
-// AppLogUtils.e("overtime:"+overtime);
|
|
|
|
|
|
+// AppLogUtils.i("isComplete:"+isComplete);
|
|
|
|
+// AppLogUtils.i("overtime:"+overtime);
|
|
// if (overtime == 0 && !isComplete) {
|
|
// if (overtime == 0 && !isComplete) {
|
|
// idCardScanResultCallback.onIDCardError("-1","超时");
|
|
// idCardScanResultCallback.onIDCardError("-1","超时");
|
|
// isComplete = true;
|
|
// isComplete = true;
|
|
@@ -400,7 +400,7 @@ public class XzxIDCardScan implements IIDCardScan {
|
|
|
|
|
|
// overtime = allTime;
|
|
// overtime = allTime;
|
|
// isComplete = false;
|
|
// isComplete = false;
|
|
-// AppLogUtils.e("startIDCardScan--重置倒计时");
|
|
|
|
|
|
+// AppLogUtils.i("startIDCardScan--重置倒计时");
|
|
startRead(100);
|
|
startRead(100);
|
|
|
|
|
|
}
|
|
}
|