Commit c76a851c by Lee Munkyeong

Merge branch 'features/1.4.100_develop' into 'features/1.4.100'

Features/1.4.100 develop

See merge request !214
parents 8ad7403d 78b8dc12
......@@ -141,6 +141,13 @@ public class Constant {
int ReportContinuous = 3; // 連続作業
}
public interface operationType {
int LIST = 0;
int DRAWING = 1;
int CONTENT360 = 2;
}
// 報告履歴管理
public interface EnableReportHistory {
int Invalid = 0; // 無効
......
Subproject commit 135a83eb1a5782ccaee8b3677942b07463e86f50
Subproject commit d67a57e92c7b11b5fc0548445d8c60ffa7c82779
......@@ -307,21 +307,27 @@ public class OperationListActivity extends ABVUIActivity {
mScanType = jsonParam.getInt(ABookKeys.SCAN_TYPE);
}
final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (tempOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
openReportView(tempOperationDto);
}
};
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(tempOperationDto);
}
});
if (tempOperationDto.operationType == Constant.operationType.CONTENT360
&& tempOperationDto.contentId == null) {
tempOperationDto.operationId = jsonParam.getLong(ABookKeys.OPERATION_ID);
showPanoEntryDialog(tempOperationDto);
} else {
openReportView(tempOperationDto);
if (tempOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
openReportView(tempOperationDto);
}
};
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(tempOperationDto);
}
});
} else {
openReportView(tempOperationDto);
}
}
break;
......@@ -331,21 +337,26 @@ public class OperationListActivity extends ABVUIActivity {
case ABookKeys.CMD_KEY.GO_PANORAMA_EDIT:
final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (panoramaOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
startPanoEdit(panoramaOperationDto);
}
};
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(panoramaOperationDto);
}
});
} else {
startPanoEdit(panoramaOperationDto);
if (panoramaOperationDto.contentId != null && panoramaOperationDto.contentId != 0) {
if (panoramaOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
startPanoEdit(panoramaOperationDto);
}
};
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(panoramaOperationDto);
}
});
} else {
startPanoEdit(panoramaOperationDto);
}
}else {
panoramaOperationDto.operationId = jsonParam.getLong(ABookKeys.OPERATION_ID);
showPanoEntryDialog(panoramaOperationDto);
}
break;
......@@ -743,8 +754,8 @@ public class OperationListActivity extends ABVUIActivity {
}
public void startTaskDirectionOrReportView(OperationDto operationDto) {
ContentDto contentDto = contentDao.getContent(operationDto.contentId);
try {
ContentDto contentDto = contentDao.getContent(operationDto.contentId);
if (contentDto != null && contentDto.downloadedFlg) {
String contentPath;
if (operationDto.operationType == OperationType.LIST) {
......@@ -1302,28 +1313,9 @@ public class OperationListActivity extends ABVUIActivity {
public void run() {
int progress = progressDialogHorizontal.getProgress();
progressDialogHorizontal.setProgress(progress + 10);
if (progress >= 100) {
closeProgressPopup();
//新着更新
final Callback progressCallback = new Callback() {
@Override
public Object callback(Object ret) {
final int progress = (int)ret;
runOnUiThread(new Runnable() {
@Override
public void run() {
if ((progressDialogHorizontal.getProgress() + progress) < 100) {
progressDialogHorizontal.setProgress(progressDialogHorizontal.getProgress() + progress);
} else {
progressDialogHorizontal.setProgress(100);
}
}
});
return null;
}
};
if (progress >= 30) {
try {
dataRefresh(true, progressCallback);
dateUpdate();
} catch (Exception e) {
handler.post(new Runnable() {
@Override
......@@ -1333,10 +1325,10 @@ public class OperationListActivity extends ABVUIActivity {
});
}
} else {
handler.postDelayed(this, 1000);
handler.postDelayed(this, 4000);
}
}
}, 1000);
}, 2000);
}
}
......@@ -1425,6 +1417,14 @@ public class OperationListActivity extends ABVUIActivity {
public void run() {
Logger.i(TAG, "[syncOperation] operationId=%s, contentId=%s", operationDto.operationId, operationDto.contentId);
// コンテンツダウンロード
if (operationDto.contentId == null) {
Logger.e(TAG, "contentDto is null !");
closeProgressPopup();
if (mCallBack != null) {
mCallBack.run();
}
return;
}
ContentDto contentDto = contentDao.getContent(operationDto.contentId);
if (contentDto == null) {
Logger.e(TAG, "contentDto is null !");
......@@ -1994,13 +1994,14 @@ public class OperationListActivity extends ABVUIActivity {
}
public void dateUpdate() {
handler.post(new Runnable() {
@Override
public void run() {
showProgressView(getString(R.string.msg_common_processing));
}
});
if (!isFinishing() && progressDialogHorizontal != null && !progressDialogHorizontal.isShowing()) {
handler.post(new Runnable() {
@Override
public void run() {
showProgressView(getString(R.string.msg_common_processing));
}
});
}
final Callback progressCallback = new Callback() {
@Override
public Object callback(Object ret) {
......
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