Commit cf9c78e7 by Lee Jaebin

位置情報の修正

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