ifengouy il y a 2 ans
Parent
commit
8608835418

+ 2 - 0
app/src/main/java/com/sunwin/visitorapp/fragment/IdcardRegFragment.java

@@ -22,6 +22,7 @@ import com.sunwin.visitorapp.activity.VisitorRegisterAc;
 import com.sunwin.visitorapp.db.BlackUserModel;
 import com.sunwin.visitorapp.db.DatabaseManager;
 import com.sunwin.visitorapp.face.CameraPreviewData;
+import com.sunwin.visitorapp.face.FRImpl;
 import com.sunwin.visitorapp.face.IDCardReaderUtil;
 import com.sunwin.visitorapp.face.IdCardReadCallback;
 import com.sunwin.visitorapp.model.OpenDoorByFaceNetResultInfo;
@@ -156,6 +157,7 @@ public class IdcardRegFragment extends BaseFragment implements IdCardReadCallbac
 
     @Override
     public void detectedUser(OpenDoorByFaceNetResultInfo info) {
+        FRImpl.getInstance().mMyIdCardInfo = null;
         FileUtil.deleteFile(mCardPath);
         FileUtil.DeleteFolder(Environment.getExternalStorageDirectory().getPath()+"/fpimg/");
         showSuccess();

+ 3 - 1
app/src/main/java/com/sunwin/visitorapp/view/FaceDetecterView.java

@@ -5,6 +5,7 @@ import android.content.Context;
 import android.graphics.Rect;
 import android.hardware.Camera;
 import android.os.Build;
+import android.os.Environment;
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.RelativeLayout;
@@ -22,6 +23,7 @@ import com.sunwin.visitorapp.face.FRAbsLoopFactory;
 import com.sunwin.visitorapp.model.OpenDoorByFaceNetResultInfo;
 import com.sunwin.visitorapp.model.bus.DescEvent;
 import com.sunwin.visitorapp.utils.Constant;
+import com.sunwin.visitorapp.utils.FileUtil;
 import com.sunwin.visitorapp.utils.LogUtil;
 import com.sunwin.visitorapp.utils.SharePrefenceUtils;
 
@@ -215,7 +217,7 @@ public class FaceDetecterView extends RelativeLayout {
             LogUtil.e(TAG, "接收成功信息");
             LogUtil.e(TAG,"----mListener---"+mListener);
             if (mListener != null) {
-
+                FileUtil.DeleteFolder(Environment.getExternalStorageDirectory().getPath()+"/fpimg/");
                 mListener.detectedUser(event.getOpenDoorByFaceNetResultInfo());
             }
         } else if (event.getDesc().equalsIgnoreCase(DescEvent.DESC_FR_NET_ERROR)) {