Browse Source

区分主动上报异常

zk 1 year ago
parent
commit
750f4fb622

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -23,6 +23,7 @@
         android:networkSecurityConfig="@xml/network_config"
         android:networkSecurityConfig="@xml/network_config"
         android:roundIcon="@mipmap/ic_launcher_round"
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
         android:supportsRtl="true"
+        android:largeHeap="true"
         android:theme="@style/Theme.DataRecover"
         android:theme="@style/Theme.DataRecover"
         tools:ignore="LockedOrientationActivity"
         tools:ignore="LockedOrientationActivity"
         tools:replace="android:allowBackup"
         tools:replace="android:allowBackup"

+ 1 - 1
app/src/main/java/com/datarecovery/master/module/audiorecover/AudioRecoverViewModel.java

@@ -294,7 +294,7 @@ public class AudioRecoverViewModel extends BaseViewModel {
         }, throwable -> {
         }, throwable -> {
             showLoadingEvent.setValue(false);
             showLoadingEvent.setValue(false);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
-            BuglyHelper.postCatchedException(throwable);
+            BuglyHelper.postCatchedException(new Exception("音频导出:", throwable));
         });
         });
     }
     }
 
 

+ 1 - 1
app/src/main/java/com/datarecovery/master/module/filerecover/FileRecoverViewModel.java

@@ -332,7 +332,7 @@ public class FileRecoverViewModel extends BaseViewModel {
         }, throwable -> {
         }, throwable -> {
             showLoadingEvent.setValue(false);
             showLoadingEvent.setValue(false);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
-            BuglyHelper.postCatchedException(throwable);
+            BuglyHelper.postCatchedException(new Exception("文件导出:", throwable));
         });
         });
     }
     }
 
 

+ 2 - 2
app/src/main/java/com/datarecovery/master/module/imgrecover/ImageRecoverViewModel.java

@@ -513,7 +513,7 @@ public class ImageRecoverViewModel extends BaseViewModel {
                     public void onError(@NonNull Throwable throwable) {
                     public void onError(@NonNull Throwable throwable) {
                         showLoadingEvent.setValue(false);
                         showLoadingEvent.setValue(false);
                         ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
                         ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
-                        BuglyHelper.postCatchedException(throwable);
+                        BuglyHelper.postCatchedException(new Exception("图片删除:", throwable));
                     }
                     }
                 });
                 });
     }
     }
@@ -576,7 +576,7 @@ public class ImageRecoverViewModel extends BaseViewModel {
         }, throwable -> {
         }, throwable -> {
             showLoadingEvent.setValue(false);
             showLoadingEvent.setValue(false);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
-            BuglyHelper.postCatchedException(throwable);
+            BuglyHelper.postCatchedException(new Exception("图片导出:", throwable));
         });
         });
     }
     }
 
 

+ 6 - 1
app/src/main/java/com/datarecovery/master/module/preview/PreviewViewModel.java

@@ -266,8 +266,13 @@ public class PreviewViewModel extends BaseViewModel {
                 }
                 }
                 , o -> ToastUtil.show(R.string.export_success, ToastUtil.LENGTH_SHORT)
                 , o -> ToastUtil.show(R.string.export_success, ToastUtil.LENGTH_SHORT)
                 , throwable -> {
                 , throwable -> {
+                    if (type == PreviewActivity.TYPE_IMG) {
+                        BuglyHelper.postCatchedException(new Exception("预览-图片导出:", throwable));
+                    } else if (type == PreviewActivity.TYPE_AUDIO) {
+                        BuglyHelper.postCatchedException(new Exception("预览-音频导出:", throwable));
+                    }
                     ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
                     ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
-                    BuglyHelper.postCatchedException(throwable);
+
                 }
                 }
         );
         );
 
 

+ 1 - 1
app/src/main/java/com/datarecovery/master/module/videorecover/VideoRecoverViewModel.java

@@ -264,7 +264,7 @@ public class VideoRecoverViewModel extends BaseViewModel {
         }, throwable -> {
         }, throwable -> {
             showLoadingEvent.setValue(false);
             showLoadingEvent.setValue(false);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
             ToastUtil.show(throwable.getMessage(), ToastUtil.LENGTH_SHORT);
-            BuglyHelper.postCatchedException(throwable);
+            BuglyHelper.postCatchedException(new Exception("视频导出:", throwable));
         });
         });
     }
     }