fix: 修改面状任务无法结束采集的问题,修改部分机型下拍照方向错误的问题

This commit is contained in:
xiaoyan 2023-02-06 17:40:48 +08:00
parent b2e5d6dd87
commit bee9fb9d59
4 changed files with 30 additions and 13 deletions

View File

@ -13,7 +13,7 @@ android {
minSdkVersion 24
targetSdkVersion 30
versionCode 45
versionName "8.230203"
versionName "8.230204"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {

View File

@ -81,6 +81,7 @@
android:exported="true"/>
<activity
android:name=".activity.PhotographActivity"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|navigation"
android:launchMode="singleTop"
android:exported="true"/>

View File

@ -109,7 +109,6 @@ public class PhotographActivity extends BaseActivity implements View.OnClickL
if (getIntent() != null) {
photo_path = getIntent().getStringExtra(Constant.INTENT_PHOTO_PATH);
}
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
cameraView = findViewById(R.id.camera);
cameraView.setOnClickListener(this);

View File

@ -740,6 +740,17 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
HttpParams httpParams = new HttpParams();
httpParams.put("id", poiEntity.getTaskId());
showLoadingDialog();
// // 隐藏半框弹出界面
// Message obtain = Message.obtain();
// obtain.what = Constant.GATHER_GET_RETURN;
// obtain.obj = false;
// EventBus.getDefault().post(obtain);
// // 刷新地图
// Message obtains = Message.obtain();
// obtains.what = Constant.JOB_WORD_MONITOR;
// obtains.obj = true;
// EventBus.getDefault().post(obtains);
// onBackPressed();
OkGoBuilder.getInstance()
.time(30)
.Builder(getActivity())
@ -750,6 +761,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
.getRequest(new Callback<UnPolygonTaskBean>() {
@Override
public void onSuccess(UnPolygonTaskBean response, int id) {
// 隐藏半框弹出界面
Message obtain = Message.obtain();
obtain.what = Constant.GATHER_GET_RETURN;
obtain.obj = false;
EventBus.getDefault().post(obtain);
dismissLoadingDialog();
if (response.getCode() == 200) {
ToastUtils.Message(getActivity(), "结束采集成功!");
@ -757,17 +774,17 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
@Override
public void run() {
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
// 隐藏半框弹出界面
Message obtain = Message.obtain();
obtain.what = Constant.GATHER_GET_RETURN;
obtain.obj = false;
EventBus.getDefault().post(obtain);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// 刷新地图
Message obtains = Message.obtain();
obtains.what = Constant.JOB_WORD_MONITOR;
obtains.obj = true;
EventBus.getDefault().post(obtains);
onBackPressed();
}
});
}
}).start();
} else if (response.getCode() == 230) {