|
@@ -380,13 +380,18 @@ public class PagerActivity extends BaseActivity implements Listener.PlayListener
|
|
|
if (result != 1)
|
|
|
continue;
|
|
|
|
|
|
- if (inPath.contains(".jpg")) {
|
|
|
- actionPhotoPath(inPath);
|
|
|
- } else if (inPath.contains(".mp4")) {
|
|
|
- actionVideoPath(inPath);
|
|
|
- } else {
|
|
|
- Log.d(TAG, "onAlbumCallback: not match");
|
|
|
- }
|
|
|
+ new Handler().postDelayed(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ if (inPath.contains(".jpg")) {
|
|
|
+ actionPhotoPath(inPath);
|
|
|
+ } else if (inPath.contains(".mp4")) {
|
|
|
+ actionVideoPath(inPath);
|
|
|
+ } else {
|
|
|
+ Log.d(TAG, "onAlbumCallback: not match");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, 20L *i);
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
@@ -880,7 +885,10 @@ public class PagerActivity extends BaseActivity implements Listener.PlayListener
|
|
|
if (bean.type == Constant.MESSAGE_TYPE_PHOTO) {
|
|
|
result = FilePathUtils.saveImage(this, bean.filePath);
|
|
|
} else if (bean.type == Constant.MESSAGE_TYPE_VIDEO) {
|
|
|
- result = FilePathUtils.saveVideo(this, bean.videoPath);
|
|
|
+ String outVideoPath = FilePathUtils.copyFile(bean.videoPath, FilePathUtils.createFilePath(Constant.E_FILE_TYPE.VIDEO));
|
|
|
+ if (outVideoPath.length() > 0) {
|
|
|
+ result = FilePathUtils.saveVideo(this, outVideoPath);
|
|
|
+ }
|
|
|
}
|
|
|
boolean finalResult = result;
|
|
|
PagerActivity.this.runOnUiThread(()->{
|