| | |
| | | import com.doumee.keyCabinet.dao.DaoManager; |
| | | import com.doumee.keyCabinet.dao.FingerPrintDo; |
| | | import com.doumee.keyCabinet.databinding.FaceActivityBinding; |
| | | import com.doumee.keyCabinet.event.FaceCheckResultEvent; |
| | | import com.doumee.keyCabinet.event.FaceStatusChangeEvent; |
| | | import com.doumee.keyCabinet.event.HttpEvent; |
| | | import com.doumee.keyCabinet.event.JiujinBeginEvent; |
| | |
| | | switch (type){ |
| | | case 1: |
| | | if(flag==0){ |
| | | //切换到管理员刷卡 |
| | | //Toast.makeText(mContext, "status:" + status, Toast.LENGTH_SHORT).show(); |
| | | if(status==0||status==10){ |
| | | //切换到管理员刷卡 |
| | | statusFsm(1); |
| | | }else if(status==2||status==11){ |
| | | //切换到司机刷卡 |
| | | statusFsm(3); |
| | | } |
| | | }else { |
| | |
| | | break; |
| | | case 9: |
| | | //指纹验证 |
| | | if(status==0) { |
| | | statusFsm(10); |
| | | if(flag==0){ |
| | | if(status==0) { |
| | | statusFsm(10); |
| | | }else { |
| | | statusFsm(11); |
| | | } |
| | | }else { |
| | | statusFsm(12); |
| | | } |
| | |
| | | case 4: |
| | | //切换到人脸 |
| | | if(flag==0){ |
| | | //Toast.makeText(mContext, "status:" + status, Toast.LENGTH_SHORT).show(); |
| | | if(status==1||status==10){ |
| | | statusFsm(0); |
| | | }else if(status==3||status==11){ |
| | |
| | | if(handler.hasMessages(1)){ |
| | | handler.removeMessages(1); |
| | | } |
| | | checkOpenDebugResult(livenessModel); |
| | | EventBus.getDefault().post(new FaceCheckResultEvent(livenessModel)); |
| | | } |
| | | }); |
| | | }catch (RuntimeException e){ |
| | |
| | | } |
| | | } |
| | | |
| | | @Subscribe(threadMode = ThreadMode.MAIN) |
| | | public void FaceCheckResultEvent(FaceCheckResultEvent e){ |
| | | if(!isFinishing()){ |
| | | checkOpenDebugResult(e.getLivenessModel()); |
| | | } |
| | | } |
| | | |
| | | private int resultCount = 0; |
| | | // ***************开发模式结果输出************* |
| | | private void checkOpenDebugResult(final LivenessModel livenessModel) { |