fix: 数据上报问题 https://jira.shanqu.cc/browse/GHZS-4698
This commit is contained in:
@ -50,11 +50,9 @@ import com.gh.common.history.HistoryDatabase;
|
||||
import com.gh.common.history.HistoryHelper;
|
||||
import com.gh.common.repository.ReservationRepository;
|
||||
import com.gh.common.simulator.SimulatorGameManager;
|
||||
import com.gh.common.util.ActivationHelper;
|
||||
import com.gh.common.util.AdHelper;
|
||||
import com.gh.common.util.CertificationSwitchHelper;
|
||||
import com.gh.common.util.DataUtils;
|
||||
import com.gh.common.util.DeviceTokenUtils;
|
||||
import com.gh.common.util.DirectUtils;
|
||||
import com.gh.common.util.EntranceUtils;
|
||||
import com.gh.common.util.ErrorHelper;
|
||||
@ -82,13 +80,11 @@ import com.gh.gamecenter.common.retrofit.Response;
|
||||
import com.gh.gamecenter.common.utils.DialogHelper;
|
||||
import com.gh.gamecenter.common.utils.ExtensionsKt;
|
||||
import com.gh.gamecenter.common.utils.NewFlatLogUtils;
|
||||
import com.gh.gamecenter.common.utils.PermissionHelper;
|
||||
import com.gh.gamecenter.common.utils.SensorsBridge;
|
||||
import com.gh.gamecenter.common.utils.ShareUtils;
|
||||
import com.gh.gamecenter.core.AppExecutor;
|
||||
import com.gh.gamecenter.core.utils.ClassUtils;
|
||||
import com.gh.gamecenter.core.utils.DisplayUtils;
|
||||
import com.gh.gamecenter.core.utils.EmptyCallback;
|
||||
import com.gh.gamecenter.core.utils.GsonUtils;
|
||||
import com.gh.gamecenter.core.utils.MtaHelper;
|
||||
import com.gh.gamecenter.core.utils.SPUtils;
|
||||
@ -171,8 +167,6 @@ public class MainActivity extends BaseActivity {
|
||||
// 黄壮华 按连续按返回键两次才退出应用
|
||||
private final long[] mHits = new long[2];
|
||||
|
||||
public static boolean isNewFirstLaunch;
|
||||
|
||||
private final Handler handler = new Handler();
|
||||
private boolean mShouldShowAd = false; // 是否显示广告
|
||||
|
||||
@ -199,15 +193,10 @@ public class MainActivity extends BaseActivity {
|
||||
replaceFragment(mMainWrapperFragment);
|
||||
|
||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
isNewFirstLaunch = sp.getBoolean("isNewFirstLaunchV" + PackageUtils.getGhVersionName(), true);
|
||||
if (isNewFirstLaunch) {
|
||||
final LunchType lunchType = DeviceTokenUtils.getLaunchType(false);
|
||||
// 延时两秒提交,避免提交时还没获取到 GID/OAID
|
||||
if (HaloApp.getInstance().isNewForThisVersion) {
|
||||
LunchType lunchType = HaloApp.getInstance().getLaunchType();
|
||||
AppExecutor.getUiExecutor().executeWithDelay(() -> {
|
||||
if (!this.isFinishing()) {
|
||||
LogUtils.uploadDevice(lunchType);
|
||||
ActivationHelper.sendActivationInfo();
|
||||
// 第一次打开App删除模拟器游戏记录(不包括更新版本)
|
||||
if (HaloApp.getInstance().isBrandNewInstall) {
|
||||
getTeenagerMode();
|
||||
@ -215,7 +204,7 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
}, 2000L);
|
||||
sp.edit().putBoolean("isNewFirstLaunchV" + PackageUtils.getGhVersionName(), false).apply();
|
||||
sp.edit().putBoolean(Constants.SP_NEW_FIRST_LAUNCH_VERSION + PackageUtils.getGhVersionName(), false).apply();
|
||||
|
||||
// 记录曾安装过的版本 + 渠道
|
||||
SPUtils.setString("installedVersionV" + PackageUtils.getGhVersionName(), HaloApp.getInstance().getChannel());
|
||||
|
||||
Reference in New Issue
Block a user