Commit cf9c78e7 by Lee Jaebin

位置情報の修正

パータンのバグ修正
parent e4b9ea7a
......@@ -70,13 +70,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="5dp"
android:layout_marginLeft="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/dummy_str"
......
......@@ -1008,7 +1008,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}, 5000);
} else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) {
// #32926 作業報告画面改善 start
setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), taskReportLevel);
setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1));
// #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) {
String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG);
......@@ -1147,10 +1147,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
/**
* 位置情報取得
* @param showPermissionDialogFlg
* @param taskReportLevel
*/
// #32926 作業報告画面改善 start
protected void setLocation(final boolean showPermissionDialogFlg, final int taskReportLevel) {
protected void setLocation(final boolean showPermissionDialogFlg) {
// #32926 作業報告画面改善 end
ABookPermissionHelper helper = new ABookPermissionHelper(this, Constant.ABookPermissionType.AccessFineLocation, null);
if (helper.checkMultiPermissions(showPermissionDialogFlg)) {
......@@ -1159,14 +1158,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override
public void onGetLocationFailed() {
Logger.w(TAG, "onGetLocationFailed");
// #32926 作業報告画面改善 start
// 報告(回答)の場合
if (taskReportLevel > 0) {
// #32926 作業報告画面改善 end
// #32926 作業報告画面改善 end
afterABookCheckApi(mCmd, "", 1, PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_location_search_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), null);
}
}
@Override
......@@ -1177,42 +1172,22 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
CommonExecutor.execute(new Runnable() {
@Override
public void run() {
// #32926 作業報告画面改善 start
// 報告(回答)の場合
if (taskReportLevel > 0) {
// #32926 作業報告画面改善 end
JSONObject json = new JSONObject();
json.put("latitude", latitude);
json.put("longitude", longitude);
afterABookCheckApi(mCmd, "", 0, "", json.toString());
} else {
while (!isPageFinished) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
}
runOnUiThread(new Runnable() {
@Override
public void run() {
webViewLoadUrl("javascript:setLocation(" + latitude + "," + longitude + ")");
}
});
}
};
JSONObject json = new JSONObject();
json.put("latitude", latitude);
json.put("longitude", longitude);
afterABookCheckApi(mCmd, "", 0, "", json.toString());
};
});
}
});
locationManagerUtil.startLocationService();
} else {
Logger.w(TAG,"onGetLocationFailed AccessFineLocation false");
if (taskReportLevel > 0) {
// リソースパターンの適用
afterABookCheckApi(mCmd, "", 1, PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_location_search_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), null);
}
}
// リソースパターンの適用
afterABookCheckApi(mCmd, "", 1, PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_location_search_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), null);
}
}
protected boolean isOperationPdf() {
......
......@@ -107,7 +107,7 @@ public class OperationListAdapter extends AbstractOperationAdapter {
} else {
// リソースパターンの適用
holder.tvDate.setText(PatternStringUtil.patternToInt(mContext,
holder.tvDate.setText(PatternStringUtil.patternToString(mContext,
R.string.date_label,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " : " + DateTimeUtil.toString(operationDto.operationStartDate, DateTimeFormat.yyyyMMdd_slash) + " ~ " + DateTimeUtil.toString(operationDto.operationEndDate, DateTimeFormat.yyyyMMdd_slash));
}
......
......@@ -134,7 +134,7 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
}
} else {
// リソースパターンの適用
holder.tvDate.setText(PatternStringUtil.patternToInt(mContext,
holder.tvDate.setText(PatternStringUtil.patternToString(mContext,
R.string.date_label,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " : " + DateTimeUtil.toString(operationDto.operationStartDate, DateTimeFormat.yyyyMMdd_slash) + " ~ " + DateTimeUtil.toString(operationDto.operationEndDate, DateTimeFormat.yyyyMMdd_slash));
}
......
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