新增捕获并上传异常日志的功能
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user