新增捕获并上传异常日志的功能

This commit is contained in:
2022-10-22 13:23:57 +08:00
parent 77f5d89f28
commit 38a269ae1c
8 changed files with 114 additions and 5 deletions

View File

@@ -99,7 +99,7 @@ public class AppContext extends CommonAppContext {
@Override
public void onActivityDestroyed(@NonNull Activity activity) {
for (WeakReference<Activity> reference : activities) {
if(reference.get()==activity){
if (reference.get() == activity) {
activities.remove(reference);
return;
}
@@ -297,7 +297,7 @@ public class AppContext extends CommonAppContext {
e.printStackTrace();
//闪退后finish所有Activity并且杀死进程
for (WeakReference<Activity> activity : activities) {
if (activity != null) {
if (activity != null && activity.get() != null) {
activity.get().finish();
}
}