Commit 55aeeca4 by Lee Jaebin

GPS送信の重複処理対応

parent 7afa8cd8
...@@ -137,6 +137,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -137,6 +137,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public int mButtonStatus; // 保存ボタンチェック public int mButtonStatus; // 保存ボタンチェック
protected boolean mAddReport; // 作業追加区分 protected boolean mAddReport; // 作業追加区分
private boolean mLocationSendResult; // GPS送信フラグ
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
...@@ -1162,6 +1164,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1162,6 +1164,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
*/ */
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
protected void setLocation(final boolean showPermissionDialogFlg) { protected void setLocation(final boolean showPermissionDialogFlg) {
mLocationSendResult = false;
// #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)) {
...@@ -1178,18 +1181,21 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1178,18 +1181,21 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override @Override
public void onGetLocation(final Location location) { public void onGetLocation(final Location location) {
latitude = location.getLatitude(); if (!mLocationSendResult) {
longitude = location.getLongitude(); latitude = location.getLatitude();
Logger.v(TAG, "location latitude(%s), longitude(%s)", latitude, longitude); longitude = location.getLongitude();
CommonExecutor.execute(new Runnable() { Logger.v(TAG, "location latitude(%s), longitude(%s)", latitude, longitude);
@Override CommonExecutor.execute(new Runnable() {
public void run() { @Override
JSONObject json = new JSONObject(); public void run() {
json.put("latitude", latitude); JSONObject json = new JSONObject();
json.put("longitude", longitude); json.put("latitude", latitude);
afterABookCheckApi(mCmd, "", 0, "", json.toString()); json.put("longitude", longitude);
}; afterABookCheckApi(mCmd, "", 0, "", json.toString());
}); };
});
mLocationSendResult = true;
}
} }
}); });
locationManagerUtil.startLocationService(); locationManagerUtil.startLocationService();
......
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