| | |
| | | private static final String TAG = SetArgumentsFragment.class.getSimpleName(); |
| | | private static final int REQUEST_CODE_MAP = 100; |
| | | private static final int REQUEST_CODE_ROADMAP = 102; |
| | | private static final int REQUEST_CODE_ROAD_MMMPK= 103; |
| | | private static final int REQUEST_CODE_YARD_MMPK = 104; |
| | | private static final int REQUEST_CODE_CAR = 101; |
| | | private int request_code = REQUEST_CODE_MAP; |
| | | private Button btn_config_signal; |
| | |
| | | view.findViewById(R.id.btn_car_upgrade).setOnClickListener(this); |
| | | view.findViewById(R.id.btn_yard_update).setOnClickListener(this); |
| | | view.findViewById(R.id.btn_road_update).setOnClickListener(this); |
| | | view.findViewById(R.id.btn_road_mmpk).setOnClickListener(this); |
| | | view.findViewById(R.id.btn_yard_mmpk).setOnClickListener(this); |
| | | btn_mcu_upgrade.setOnClickListener(this); |
| | | btn_map_select.setOnClickListener(this); |
| | | btn_config_signal = view.findViewById(R.id.btn_signal_conf); |
| | |
| | | }); |
| | | WorkManager.getInstance(_mActivity).enqueue(oneTimeWorkRequest1); |
| | | break; |
| | | case R.id.btn_yard_mmpk: |
| | | MyLog.i(TAG,"选择场地离线地图包"); |
| | | request_code = REQUEST_CODE_YARD_MMPK; |
| | | openFileMgr(); |
| | | break; |
| | | case R.id.btn_road_mmpk: |
| | | MyLog.i(TAG,"选择道路离线地图包"); |
| | | request_code = REQUEST_CODE_ROAD_MMMPK; |
| | | openFileMgr(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | }else if (requestCode == REQUEST_CODE_ROAD_MMMPK){ |
| | | if (data != null){ |
| | | final Uri uri= data.getData(); |
| | | MyLog.i(TAG, "road mmpk onActivityResult: "+uri.getPath()); |
| | | ExamPlatformData.getInstance().setRoadMMPKPath(uri.getPath()); |
| | | } |
| | | |
| | | }else if (requestCode == REQUEST_CODE_YARD_MMPK){ |
| | | if (data != null){ |
| | | final Uri uri = data.getData(); |
| | | MyLog.i(TAG, "yard mmpk onActivityResult: "+uri.getPath()); |
| | | ExamPlatformData.getInstance().setYardMMPKPath(uri.getPath()); |
| | | } |
| | | } |
| | | } |
| | | |