Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS
Conflicts: app/src/main/java/com/navinfo/omqs/ui/fragment/personalcenter/PersonalCenterFragment.kt
This commit is contained in:
@@ -119,12 +119,12 @@ class MainViewModel @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
TraceDataBase.getDatabase(
|
||||
context,
|
||||
Constant.USER_DATA_PATH + "/trace.sqlite"
|
||||
).niLocationDao.insert(niLocation)
|
||||
niLocationList.removeAt(0)
|
||||
Log.e("qj", "saveTrace")
|
||||
TraceDataBase.getDatabase(context, Constant.USER_DATA_PATH + "/trace.sqlite").niLocationDao.insert(niLocation)
|
||||
|
||||
niLocationList.remove(niLocation)
|
||||
|
||||
Log.e("qj", "saveTrace==${niLocationList.size}")
|
||||
|
||||
}
|
||||
Thread.sleep(30)
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.navinfo.collect.library.sensor.ISensor.enmConnectionStatus;
|
||||
import com.navinfo.collect.library.sensor.ISensor.SensorWorkingMode;
|
||||
import com.navinfo.collect.library.garminvirbxe.SensorParams;
|
||||
import com.navinfo.collect.library.garminvirbxe.HostBean;
|
||||
import com.navinfo.collect.library.system.VLCApplication;
|
||||
import com.navinfo.omqs.Constant;
|
||||
import com.navinfo.omqs.R;
|
||||
import com.navinfo.omqs.ui.activity.map.MainActivity;
|
||||
@@ -714,38 +715,38 @@ public class CommonDialog extends Dialog implements SurfaceHolder.Callback, IVid
|
||||
if (indexClentCamera == 2)
|
||||
resId = R.id.main_activity_camera2;
|
||||
|
||||
Drawable drawable = context.getResources().getDrawable(R.mipmap.icon_page_video_a0);
|
||||
Drawable drawable = context.getResources().getDrawable(R.drawable.icon_page_video_a0);
|
||||
|
||||
ShareUtil shareUtil = new ShareUtil(context, indexClentCamera);
|
||||
//0为录像模式
|
||||
if (shareUtil.getTakeCameraMode() == 0) {
|
||||
switch (statusType) {
|
||||
case 0:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_video_a0);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_video_a0);
|
||||
break;
|
||||
case 1:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_video_a1);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_video_a1);
|
||||
break;
|
||||
case 2:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_video_a2);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_video_a2);
|
||||
break;
|
||||
case 3:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_video_a3);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_video_a3);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (statusType) {
|
||||
case 0:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_take_photo_a0);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_take_photo_a0);
|
||||
break;
|
||||
case 1:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_take_photo_a1);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_take_photo_a1);
|
||||
break;
|
||||
case 2:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_take_photo_a2);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_take_photo_a2);
|
||||
break;
|
||||
case 3:
|
||||
drawable = context.getResources().getDrawable(R.mipmap.icon_page_take_photo_a3);
|
||||
drawable = context.getResources().getDrawable(R.drawable.icon_page_take_photo_a3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1597,9 +1598,9 @@ public class CommonDialog extends Dialog implements SurfaceHolder.Callback, IVid
|
||||
}
|
||||
|
||||
private void setmImgViewImageDrawable(int type) {
|
||||
Drawable drawable = getContext().getResources().getDrawable(R.mipmap.icon_camera_img);
|
||||
Drawable drawable = getContext().getResources().getDrawable(R.drawable.icon_camera_img);
|
||||
if (type == 1)
|
||||
drawable = getContext().getResources().getDrawable(R.mipmap.icon_camera_take_photo_img);
|
||||
drawable = getContext().getResources().getDrawable(R.drawable.icon_camera_take_photo_img);
|
||||
|
||||
if (mImgView != null)
|
||||
mImgView.setImageDrawable(drawable);
|
||||
|
||||
@@ -80,22 +80,21 @@ class PersonalCenterFragment : BaseFragment(), FSAFActivityCallbacks {
|
||||
}
|
||||
})
|
||||
}
|
||||
// R.id.personal_center_menu_import_data -> { // 导入zip数据
|
||||
// fileChooser.openChooseFileDialog(object : FileChooserCallback() {
|
||||
// override fun onCancel(reason: String) {
|
||||
// }
|
||||
//
|
||||
// override fun onResult(uri: Uri) {
|
||||
// val file = UriUtils.uri2File(uri)
|
||||
// val importOMDBHelper: ImportOMDBHelper =
|
||||
// importOMDBHiltFactory.obtainImportOMDBHelper(
|
||||
// requireContext(),
|
||||
// file
|
||||
// )
|
||||
// viewModel.importOMDBData(importOMDBHelper)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
R.id.personal_center_menu_import_data -> { // 导入zip数据
|
||||
fileChooser.openChooseFileDialog(object : FileChooserCallback() {
|
||||
override fun onCancel(reason: String) {
|
||||
}
|
||||
|
||||
override fun onResult(uri: Uri) {
|
||||
val file = UriUtils.uri2File(uri)
|
||||
val importOMDBHelper: ImportOMDBHelper = importOMDBHiltFactory.obtainImportOMDBHelper(
|
||||
requireContext(),
|
||||
file
|
||||
)
|
||||
viewModel.importOMDBData(importOMDBHelper)
|
||||
}
|
||||
})
|
||||
}
|
||||
R.id.personal_center_menu_import_yuan_data -> {
|
||||
// 用户选中导入数据,打开文件选择器,用户选择导入的数据文件目录
|
||||
fileChooser.openChooseFileDialog(object : FileChooserCallback() {
|
||||
|
||||
Reference in New Issue
Block a user