Commit e4b9ea7a by Lee Jaebin

Merge branch 'feature/1.0.1_33006' into feature/1.0.1

parents 50bc09c3 3a68b824
package jp.agentec.abook.abv.ui.common.constant; package jp.agentec.abook.abv.ui.common.constant;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
import static org.chromium.base.ContextUtils.getApplicationContext;
/** /**
* ユーザ認証を行ったりするときのエラーコードです。 * ユーザ認証を行ったりするときのエラーコードです。
...@@ -108,22 +102,8 @@ public enum ErrorCode { ...@@ -108,22 +102,8 @@ public enum ErrorCode {
M006(R.string.M006), M006(R.string.M006),
M007(R.string.M007), M007(R.string.M007),
ERROR(R.string.ERROR), ERROR(R.string.ERROR),
DOWNLOAD_CANCEL_ERROR(R.string.DOWNLOAD_CANCEL_ERROR), DOWNLOAD_CANCEL_ERROR(R.string.DOWNLOAD_CANCEL_ERROR);
// リソースパターンの適用
P_E_ACMS_P001(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P001,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))),
P_E_ACMS_P002(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P002,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))),
P_E_ACMS_P003(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P003,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))),
P_E_ACMS_P004(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P004,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
public final int resId; public final int resId;
ErrorCode(int index) { ErrorCode(int index) {
......
...@@ -150,10 +150,6 @@ public class ErrorMessage { ...@@ -150,10 +150,6 @@ public class ErrorMessage {
ErrorCode.S_E_ACMS_L010, ErrorCode.S_E_ACMS_L010,
ErrorCode.S_E_ACMS_L012, ErrorCode.S_E_ACMS_L012,
ErrorCode.E129, ErrorCode.E129,
ErrorCode.P_E_ACMS_P001,
ErrorCode.P_E_ACMS_P002,
ErrorCode.P_E_ACMS_P003,
ErrorCode.P_E_ACMS_P004
}; };
for (int i = 0; i < searchedArray.length; i++) { for (int i = 0; i < searchedArray.length; i++) {
if (searchedArray[i].name().equals(codeName)) { if (searchedArray[i].name().equals(codeName)) {
......
...@@ -718,7 +718,9 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -718,7 +718,9 @@ public class OperationListActivity extends ABVUIActivity {
// 報告送信 // 報告送信
if (mOperationLogic.sendTaskReportSendData(operationId, progressCallback)) { if (mOperationLogic.sendTaskReportSendData(operationId, progressCallback)) {
// 作業報告タイプが定期点検且つ、P005のエラーの場合、以下のエラーをトーストメッセージで表示 // 作業報告タイプが定期点検且つ、P005のエラーの場合、以下のエラーをトーストメッセージで表示
handleErrorMessageToast(R.string.P005); handleErrorMessageToast(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P005,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
progressDialogHorizontal.setProgress(60); progressDialogHorizontal.setProgress(60);
...@@ -752,10 +754,15 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -752,10 +754,15 @@ public class OperationListActivity extends ABVUIActivity {
//noinspection EnumSwitchStatementWhichMissesCases //noinspection EnumSwitchStatementWhichMissesCases
switch (e.getCode()) { switch (e.getCode()) {
case P_E_ACMS_P003: case P_E_ACMS_P003:
showSimpleAlertDialog(R.string.app_name, R.string.P003); // リソースパターンを適用
showSimpleAlertDialog(R.string.app_name, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P003,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
break; break;
case P_E_ACMS_P004: case P_E_ACMS_P004:
showSimpleAlertDialog(R.string.app_name, R.string.P004); showSimpleAlertDialog(R.string.app_name, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P004,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
break; break;
case S_E_ACMS_0500: case S_E_ACMS_0500:
handleErrorMessageToast(ABVExceptionCode.S_E_ACMS_0500); handleErrorMessageToast(ABVExceptionCode.S_E_ACMS_0500);
...@@ -1138,10 +1145,16 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1138,10 +1145,16 @@ public class OperationListActivity extends ABVUIActivity {
//noroutineion EnumSwitchStatementWhichMissesCases //noroutineion EnumSwitchStatementWhichMissesCases
switch (e.getCode()) { switch (e.getCode()) {
case P_E_ACMS_P001: case P_E_ACMS_P001:
showSimpleAlertDialog(R.string.app_name, R.string.P001); showSimpleAlertDialog(R.string.app_name,
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P001,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
break; break;
case P_E_ACMS_P002: case P_E_ACMS_P002:
showSimpleAlertDialog(R.string.app_name, R.string.P002); showSimpleAlertDialog(R.string.app_name,
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P002,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
break; break;
case S_E_ACMS_0500: case S_E_ACMS_0500:
handleErrorMessageToast(ABVExceptionCode.S_E_ACMS_0500); handleErrorMessageToast(ABVExceptionCode.S_E_ACMS_0500);
......
...@@ -181,8 +181,8 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -181,8 +181,8 @@ public class ABookCheckWebViewHelper extends ABookHelper {
if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) { if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) {
// リソースパターンの適用 // リソースパターンの適用
context.handleErrorMessageToast(PatternStringUtil.patternToInt(context, context.handleErrorMessageToast(PatternStringUtil.patternToInt(context,
R.string.P005, R.string.P005,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))); getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
} catch (ABVException ex) { } catch (ABVException ex) {
......
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