Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev

This commit is contained in:
kehaoyuan
2019-03-25 18:28:00 +08:00
9 changed files with 43 additions and 19 deletions

View File

@ -27,6 +27,7 @@ import android.widget.TextView;
import com.gh.base.AppUncaughtHandler;
import com.gh.base.BaseActivity;
import com.gh.base.fragment.BaseFragment_ViewPager;
import com.gh.common.AppExecutor;
import com.gh.common.constant.Config;
import com.gh.common.exposure.ExposureUtils;
import com.gh.common.exposure.meta.MetaUtil;
@ -259,7 +260,12 @@ public class MainActivity extends BaseActivity {
isNewFirstLaunch = mSp.getBoolean("isNewFirstLaunchV" + PackageUtils.getVersionName(), true);
if (isNewFirstLaunch) {
LogUtils.uploadDevice(DeviceTokenUtils.getLaunchType());
// 延时两秒提交 APP 启动日志的,避免提交时还没获取到 GID
AppExecutor.getUiExecutor().executeWithDelay(() -> {
if(!this.isFinishing()) {
LogUtils.uploadDevice(DeviceTokenUtils.getLaunchType());
}
}, 2000L);
getPluginUpdate();
sendActivationInfo();
mSp.edit().putBoolean("isNewFirstLaunchV" + PackageUtils.getVersionName(), false).apply();