补充反馈日志

This commit is contained in:
zlzw 2022-10-27 17:56:27 +08:00
parent 135f8f5be3
commit 78c4c455a8
3 changed files with 12 additions and 0 deletions

View File

@ -117,6 +117,7 @@ public class AppContext extends CommonAppContext {
@Override
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
activities.add(new WeakReference<>(activity));
CrashSaveBean.getInstance().setActivitySize(activities.size());
}
@Override
@ -358,5 +359,6 @@ public class AppContext extends CommonAppContext {
FirebaseCrashlytics.getInstance().setCustomKey("enterRoom", CrashSaveBean.getInstance().getEnterRoom());
FirebaseCrashlytics.getInstance().setCustomKey("slidingRoom", CrashSaveBean.getInstance().getSlidingRoom());
FirebaseCrashlytics.getInstance().setCustomKey("playSvga", CrashSaveBean.getInstance().getPlaySvga());
FirebaseCrashlytics.getInstance().setCustomKey("ActivitySize", CrashSaveBean.getInstance().getActivitySize());
}
}

View File

@ -143,6 +143,7 @@ public class NeverCrashUtils {
writer.write("enterRoom=" + CrashSaveBean.getInstance().getEnterRoom()+ "\n");
writer.write("slidingRoom=" + CrashSaveBean.getInstance().getSlidingRoom()+ "\n");
writer.write("playSvga=" + CrashSaveBean.getInstance().getPlaySvga()+ "\n");
writer.write("ActivitySize=" + CrashSaveBean.getInstance().getActivitySize()+ "\n");
writer.write("UserData=" + SpUtil.getInstance().getStringValue(SpUtil.USER_INFO) + "\n");
writer.write("[ERROR]");
PrintWriter printWriter = new PrintWriter(writer);

View File

@ -9,6 +9,7 @@ public class CrashSaveBean {
private long enterRoom;//进入房间次数
private long slidingRoom;//滑动直播间次数
private long playSvga;//加载播放svga次数
private long activitySize;//Activity数量
private CrashSaveBean() {
@ -52,5 +53,13 @@ public class CrashSaveBean {
public void addSlidingRoom() {
slidingRoom++;
}
public long getActivitySize() {
return activitySize;
}
public void setActivitySize(long activitySize) {
this.activitySize = activitySize;
}
}