|
|
@@ -271,7 +271,6 @@ public class OperationPresenter extends BasePresenter<IOperationView> {
|
|
|
croppedBmp.recycle();
|
|
|
rotatedBitmap.recycle();
|
|
|
if (saveCropSuccess) {
|
|
|
-
|
|
|
List<File> fileList = Luban.with(context)
|
|
|
.load(file)
|
|
|
.ignoreBy(400)
|
|
|
@@ -279,7 +278,10 @@ public class OperationPresenter extends BasePresenter<IOperationView> {
|
|
|
.get();
|
|
|
File compressedFile = fileList.get(0);
|
|
|
|
|
|
- file.delete();
|
|
|
+ if (!TextUtils.equals(compressedFile.getAbsolutePath(), file.getAbsolutePath())) {
|
|
|
+ file.delete();
|
|
|
+ }
|
|
|
+
|
|
|
// 通知相册去获取
|
|
|
MediaScannerConnection.scanFile(context, new String[] { compressedFile.getAbsolutePath() }, new String[] { "image/jpeg" }, null);
|
|
|
// 保存最终截图成功
|
|
|
@@ -388,7 +390,6 @@ public class OperationPresenter extends BasePresenter<IOperationView> {
|
|
|
|
|
|
// 压缩图片
|
|
|
boolean saveCropSuccess = ImageUtil.saveBitmapFile(rotatedBitmap, file, 1);
|
|
|
-
|
|
|
normalBitmap.recycle();
|
|
|
croppedBmp.recycle();
|
|
|
rotatedBitmap.recycle();
|