修复首页周星榜svga会消失的问题
修复Firebase可能没uid的问题 新增其他事件统计
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
/**
|
||||
* 用于统计记录崩溃的数据
|
||||
*/
|
||||
public class CrashSaveBean {
|
||||
private static CrashSaveBean bean;
|
||||
private long startTime;//应用启动时间
|
||||
private long enterRoom;//进入房间次数
|
||||
private long slidingRoom;//滑动直播间次数
|
||||
private long playSvga;//加载播放svga次数
|
||||
|
||||
private CrashSaveBean() {
|
||||
|
||||
}
|
||||
|
||||
public static CrashSaveBean getInstance() {
|
||||
if (bean == null) {
|
||||
bean = new CrashSaveBean();
|
||||
}
|
||||
return bean;
|
||||
}
|
||||
|
||||
public long getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public long getEnterRoom() {
|
||||
return enterRoom;
|
||||
}
|
||||
|
||||
public long getPlaySvga() {
|
||||
return playSvga;
|
||||
}
|
||||
|
||||
public long getSlidingRoom() {
|
||||
return slidingRoom;
|
||||
}
|
||||
|
||||
public void addEnterRoom() {
|
||||
enterRoom++;
|
||||
}
|
||||
|
||||
public void addPlaySvga() {
|
||||
playSvga++;
|
||||
}
|
||||
|
||||
public void addSlidingRoom() {
|
||||
slidingRoom++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.animation.ValueAnimator;
|
||||
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
@@ -18,6 +19,7 @@ public class SVGAViewUtils {
|
||||
SVGA_CACHE.add(svga);
|
||||
}
|
||||
}
|
||||
CrashSaveBean.getInstance().addPlaySvga();
|
||||
svga.setCallback(new SVGACallback() {
|
||||
@Override
|
||||
public void onPause() {
|
||||
@@ -58,6 +60,10 @@ public class SVGAViewUtils {
|
||||
for (SVGAImageView view : SVGA_CACHE) {
|
||||
try {
|
||||
if (view != null) {
|
||||
Object tag = view.getTag();
|
||||
if(tag!=null&&tag.toString().equals("save")){
|
||||
continue;
|
||||
}
|
||||
view.clear();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user