Commit a8183c7d by Lee Munkyeong

コードレビュー対応及び動画エンコード失敗の処理追加。

parent dc6b6967
......@@ -825,7 +825,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
String encodedPath = new VideoEncoder().changeResolution(file, callBack);
encodedFilePath = encodedPath;
} catch (Throwable throwable) {
throwable.printStackTrace();
mChatWebView.loadUrl("javascript:CHAT_UI.videoEncodeFail();)");
}
}
};
......@@ -854,14 +854,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
Uri baseUri = Uri.parse("content://media/external/video/media");
return Uri.withAppendedPath(baseUri, "" + id);
} else {
if (file.exists()) {
if (!file.exists()) { return null; }
ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, filePath);
return context.getContentResolver().insert(
MediaStore.Video.Media.EXTERNAL_CONTENT_URI, values);
} else {
return null;
}
MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
values);
}
}
......
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