Commit 0ecafb06 by Lee Munkyeong

作業データのダウンロードが終われば作業を開けるように修正。

parent e81ee568
Subproject commit 6000dac6d681be5f8f97d39419df8158777bfbaf Subproject commit 77868961630429fffe6adafe3742bb79ceb30754
...@@ -104,7 +104,7 @@ public abstract class ABVActivity extends Activity { ...@@ -104,7 +104,7 @@ public abstract class ABVActivity extends Activity {
public static final String URL = "url"; public static final String URL = "url";
public static final String MESSAGE = "message"; public static final String MESSAGE = "message";
public static final String PASSWORD = "password"; public static final String PASSWORD = "password";
public Runnable mCallBack;
protected static final int FP = android.view.ViewGroup.LayoutParams.MATCH_PARENT; protected static final int FP = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
protected static final int WC = android.view.ViewGroup.LayoutParams.WRAP_CONTENT; protected static final int WC = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
protected static final int R_FP = ViewGroup.LayoutParams.MATCH_PARENT; protected static final int R_FP = ViewGroup.LayoutParams.MATCH_PARENT;
...@@ -198,6 +198,10 @@ public abstract class ABVActivity extends Activity { ...@@ -198,6 +198,10 @@ public abstract class ABVActivity extends Activity {
catch (Exception e) { catch (Exception e) {
Logger.e(TAG, "_closeProgressPopup error. progressDialogHorizontal error = " +e.toString()); Logger.e(TAG, "_closeProgressPopup error. progressDialogHorizontal error = " +e.toString());
} }
if (mCallBack != null) {
mCallBack.run();
mCallBack = null;
}
} }
} }
......
...@@ -133,7 +133,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -133,7 +133,6 @@ public class OperationListActivity extends ABVUIActivity {
private Dialog mSearchDialog; private Dialog mSearchDialog;
private Date mOperationLastEditDate; private Date mOperationLastEditDate;
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class); private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
private OperationContentDao mOperationContentDao = AbstractDao.getDao(OperationContentDao.class); private OperationContentDao mOperationContentDao = AbstractDao.getDao(OperationContentDao.class);
...@@ -332,15 +331,16 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -332,15 +331,16 @@ public class OperationListActivity extends ABVUIActivity {
} }
final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID)); final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (tempOperationDto.needSyncFlg) { if (tempOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
openReportView(tempOperationDto);
}
};
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
startSyncOperation(tempOperationDto, new Runnable() { startSyncOperation(tempOperationDto);
@Override
public void run() {
openReportView(tempOperationDto);
}
});
} }
}); });
} else { } else {
...@@ -355,15 +355,16 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -355,15 +355,16 @@ public class OperationListActivity extends ABVUIActivity {
case ABookKeys.CMD_KEY.GO_PANORAMA_EDIT: case ABookKeys.CMD_KEY.GO_PANORAMA_EDIT:
final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID)); final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (panoramaOperationDto.needSyncFlg) { if (panoramaOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
public void run() {
startTaskDirectionOrReportView(panoramaOperationDto);
}
};
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
startSyncOperation(panoramaOperationDto, new Runnable() { startSyncOperation(panoramaOperationDto);
@Override
public void run() {
startTaskDirectionOrReportView(panoramaOperationDto);
}
});
} }
}); });
} else { } else {
...@@ -1350,7 +1351,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1350,7 +1351,7 @@ public class OperationListActivity extends ABVUIActivity {
* 同期処理 * 同期処理
* @param operationDto * @param operationDto
*/ */
public void startSyncOperation(final OperationDto operationDto, final Runnable callback) { public void startSyncOperation(final OperationDto operationDto) {
//ネットワークチェック //ネットワークチェック
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) { if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.request_network_connection, Toast.LENGTH_SHORT); ABVToastUtil.showMakeText(OperationListActivity.this, R.string.request_network_connection, Toast.LENGTH_SHORT);
......
...@@ -167,7 +167,7 @@ public abstract class OperationListHelper { ...@@ -167,7 +167,7 @@ public abstract class OperationListHelper {
@Override @Override
public void onSyncOperation(final OperationDto operationDto) { public void onSyncOperation(final OperationDto operationDto) {
// 同期処理 // 同期処理
mAppActivity.startSyncOperation(operationDto, null); mAppActivity.startSyncOperation(operationDto);
} }
}); });
...@@ -235,7 +235,7 @@ public abstract class OperationListHelper { ...@@ -235,7 +235,7 @@ public abstract class OperationListHelper {
@Override @Override
public void onSyncOperation(final OperationDto operationDto) { public void onSyncOperation(final OperationDto operationDto) {
// 同期処理 // 同期処理
mAppActivity.startSyncOperation(operationDto, null); mAppActivity.startSyncOperation(operationDto);
} }
}); });
......
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