| | |
| | | import java.io.File; |
| | | import java.io.InputStreamReader; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.Executors; |
| | | |
| | | import safeluck.drive.evaluation.DB.WorkRoomDataBase; |
| | |
| | | import safeluck.drive.evaluation.util.FileUtil; |
| | | import safeluck.drive.evaluation.util.SystemUtil; |
| | | import safeluck.drive.evaluation.util.Utils; |
| | | |
| | | import static safeluck.drive.evaluation.bean.ExamPlatformData.getRulesettingFilesName; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | |
| | | |
| | | private void sendJudgeArgs() { |
| | | File dir = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+getPackageName()); |
| | | |
| | | List<String> names = ExamPlatformData.getRulesettingFilesName(); |
| | | for (int i = 0; i < names.size(); i++) { |
| | | File settFile = new File(dir,names.get(i)); |
| | | if (settFile.exists() ){ |
| | | Log.i(TAG,settFile.getName()+"存在不复制"); |
| | | }else{ |
| | | Log.i(TAG,settFile.getName()+"不存在,复制..."); |
| | | FileUtil.copyAssertFileToSD(getApplicationContext(),names.get(i)); |
| | | } |
| | | } |
| | | |
| | | if (dir.exists()){ |
| | | File[] files = dir.listFiles(); |
| | | for (int i = 0; i < files.length; i++) { |
| | | if (files[i].getName().contains("_setting")||files[i].getName().contains("_Setting")){ |
| | | Log.i(TAG,files[i].getName()); |
| | | if (names.contains(files[i].getName())){ |
| | | |
| | | |
| | | byte[] buffer = FileUtil.readFile(files[i].getAbsolutePath()); |
| | | AYSdk.getInstance().sendCmd(Constant.ID_judge_args,new String(buffer).trim()); |
| | | }else{ |
| | | |
| | | } |
| | | } |
| | | } |