Commit f297112b by Lee Jaebin

テスト仕様書No.78 (一括同期で資料ダウンロード失敗時、ダイアログとトーストメッセージが両方出る問題修正(エラーメッセージにhttpStatusを表示))

parent 2aedb779
......@@ -13,13 +13,11 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterDao;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.comparator.OperationGroupMasterLevelComparator;
/**
......
......@@ -734,7 +734,19 @@ public class OperationListActivity extends ABVUIActivity {
@Override
public void onDownloadingContentZip(final ContentZipDownloadNotification notification) {
Logger.d(TAG, "[onDownloadingContentZip]");
super.onDownloadingContentZip(notification);
String errorCodeStr = "";
if (isShowingBatchSync()) {
if (notification.getError() != null) {
Exception e = notification.getError();
Logger.e(TAG, e);
if (e instanceof AcmsException && ((AcmsException)e).getCode() != null) {
errorCodeStr = Integer.toString(((AcmsException)e).getHttpStatus());
}
}
} else {
// 一括同期以外は親Activityに通知する
super.onDownloadingContentZip(notification);
}
OperationContentDto operationContentDto = mOperationContentDao.getOperationContentForContentId(notification.getContentId());
if (operationContentDto != null) {
if (notification.downloadStatus == DownloadStatusType.Succeeded) {
......@@ -751,7 +763,7 @@ public class OperationListActivity extends ABVUIActivity {
if (isShowingBatchSync()) {
// 一括同期からのダウンロード失敗時、エラーメッセージ表示
OperationDto operationDto = mOperationLogic.getOperation(operationContentDto.operationId);
batchSyncView.showBatchSyncErrorAlert(operationDto, getString(R.string.msg_batch_sync_content_download_fail));
batchSyncView.showBatchSyncErrorAlert(operationDto, getString(R.string.msg_batch_sync_content_download_fail) + (StringUtil.isNullOrEmpty(errorCodeStr) ? "" : "(" + errorCodeStr + ")"));
}
closeProgressPopup();
}
......
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