Commit 3f94f1d3 by Kim Jinsung

Merge branch 'features/1.0.500_#33721' into 'feature/1.1.0'

Bug #34404【Check Android 1.1.0】「編集画面の表示に失敗しました。」と、表示されると、編集ができなくなる。

See merge request !26
parents 50d281a4 06175d94
......@@ -1354,12 +1354,16 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
final String cmd = mCmd;
Long operationId = mOperationId;
final String tempImagePath = ABVEnvironment.getInstance().getTempFilePath(getContentId(), taskKey, attachedFilename); //添付ファイルのTempパス
String savedImagePath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey,0) + "/" + attachedFilename; //保存された写真のパス
// String savedImagePath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey,0) + "/" + attachedFilename; //保存された写真のパス
//保存されたイメージがあり、編集したいイメージのパスがTempがない場合、ファイルをTempにコピー
// パスがTempと一緒の場合、イメージが一回以上修正され、上書きしない。
if(FileUtil.exists(savedImagePath) && !mEditFilePath.equals(tempImagePath)){
if(mEditFilePath != null && !mEditFilePath.equals(tempImagePath)){
try {
FileUtil.copy(savedImagePath,tempImagePath,true); //保存されたファイルをTempパスにコピー
File editFile = new File(mEditFilePath);
String savedImagePath = getDataDir().toString() + editFile.getCanonicalPath();
if(FileUtil.exists(savedImagePath)) {
FileUtil.copy(savedImagePath, tempImagePath, true); //保存されたファイルをTempパスにコピー
}
} catch (IOException e) {
e.printStackTrace();
return;
......@@ -1367,7 +1371,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
if(FileUtil.exists(tempImagePath)){ //Tempパスにファイルがある場合、編集を実行
//編集画面をコール
if(isRotatable()) {
if(!isNormalSize() && isRotatable()) {
setFixedOrientation(true); //回転固定
}
PhotoEditActivity dialog = new PhotoEditActivity(ABVContentViewActivity.this, tempImagePath); //ロードして編集するイメージのパスを設定
......@@ -1379,7 +1383,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
webViewLoadUrl(String.format("javascript:CHK.changeReportFormThumbnailImageForAnd('%s','%s')", attachedFilename, tempImagePath));
afterABookCheckApi(cmd, taskKey, 0, "", null);
mPhotoEditDialog = null;
if(isRotatable()) {
mEditFilePath = null;
if(!isNormalSize() && isRotatable()) {
setFixedOrientation(false); ////回転可能
}
}
......
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