| | |
| | | JKMessage8001 jkMessage8001 = (JKMessage8001) jk2019MessageBase; |
| | | String hexMessageId = jkMessage8001.respMessageId; |
| | | if (hexMessageId.equalsIgnoreCase("0101")){ |
| | | MyLog.i(PlatFormConstant.TAG,"鉴权成功"); |
| | | ExamPlatformData.getInstance().setExamplatformStatus(ExamPlatformData.DEV_LOGIN); |
| | | if (jkMessage8001.result == JKMessage8001.SUCCESS){ |
| | | MyLog.i(PlatFormConstant.TAG,"鉴权成功"); |
| | | ExamPlatformData.getInstance().setExamplatformStatus(ExamPlatformData.DEV_LOGIN); |
| | | }else{ |
| | | MyLog.i(PlatFormConstant.TAG,"鉴权不成功:"+jkMessage8001.result); |
| | | ExamPlatformData.getInstance().setExamplatformStatus(ExamPlatformData.DEV_NOT_LOGIN); |
| | | } |
| | | |
| | | }else{ |
| | | MyLog.i(PlatFormConstant.TAG,"收到了鉴权消息,但鉴权不成功"); |
| | | ExamPlatformData.getInstance().setExamplatformStatus(ExamPlatformData.DEV_NOT_LOGIN); |
| | | MyLog.i(PlatFormConstant.TAG,String.format("收到了对%s消息的应答",jkMessage8001.respMessageId)); |
| | | } |
| | | }else if (jk2019MessageBase instanceof JKMessage8201){ |
| | | JKMessage8201 jkMessage8201 = (JKMessage8201) jk2019MessageBase; |
| | |
| | | private boolean canSend(String msgId){ |
| | | if (ExamPlatformData.getInstance().getTrainingMode()==ExamPlatformData.TRAINING_MODE){ |
| | | //训练模式下 只有几条可以发送 |
| | | MyLog.i(PlatFormConstant.TAG,"训练模式,msgid="+msgId); |
| | | switch (msgId){ |
| | | case "0206": |
| | | case "0100": |
| | | case "0101": |
| | | return true; |
| | | default: |
| | | return false; |
| | | } |
| | | |
| | | }else{ |
| | | //考试模式下全部都可以发送 |
| | | return true; |
| | | } |
| | | return false; |
| | | |
| | | } |
| | | } |