Commit 8b450337 by Lee Jaebin

テスト仕様書No.83~92  作業報告画面でインタネットが繋がらない状態で登録・更新しても同期フラグがfalseの状態である問題修正、自動同期時にインタネットチェック追加

parent f297112b
...@@ -493,6 +493,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -493,6 +493,10 @@ public class OperationListActivity extends ABVUIActivity {
public void run() { public void run() {
Logger.d(TAG, "onResume Sync operationId : " + operationId); Logger.d(TAG, "onResume Sync operationId : " + operationId);
if (operationDto != null && operationDto.needSyncFlg) { if (operationDto != null && operationDto.needSyncFlg) {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.msg_network_offline, Toast.LENGTH_SHORT);
return;
}
// 同期処理後、直列処理で新着更新を行う。 // 同期処理後、直列処理で新着更新を行う。
singleSyncOperation(operationId, operationDto.reportType); singleSyncOperation(operationId, operationDto.reportType);
} else { } else {
......
...@@ -149,7 +149,9 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -149,7 +149,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param taskKey タスクキー * @param taskKey タスクキー
*/ */
private void sendTaskData(final ABVContentViewActivity context, final long operationId, final String taskKey, final int taskReportLevel) { private void sendTaskData(final ABVContentViewActivity context, final long operationId, final String taskKey, final int taskReportLevel) {
// TODO 以下の処理見直し // needSyncFlgをtrueに設定
mOperationLogic.updateSyncOperation(operationId, true);
// ネットワーク通信チェック // ネットワーク通信チェック
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) { if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
mFinishCallback.callback(false); mFinishCallback.callback(false);
...@@ -177,11 +179,9 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -177,11 +179,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
OperationDto operationDto = mOperationLogic.getOperation(operationId);
boolean isError = false; boolean isError = false;
try { try {
mOperationLogic.updateSyncOperation(operationId, true);
mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback); mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback);
} catch (AcmsException ex) { } catch (AcmsException ex) {
//noinspection EnumSwitchStatementWhichMissesCases //noinspection EnumSwitchStatementWhichMissesCases
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment