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