This commit is contained in:
@ -33,15 +33,12 @@ import com.gh.common.util.PackageUtils;
|
||||
import com.gh.common.util.PlatformUtils;
|
||||
import com.gh.common.util.SPUtils;
|
||||
import com.gh.common.util.TagUtils;
|
||||
import com.gh.common.util.TimestampUtils;
|
||||
import com.gh.common.util.UsageStatsHelper;
|
||||
import com.gh.download.DownloadManager;
|
||||
import com.gh.gamecenter.entity.DeviceDialogEntity;
|
||||
import com.gh.gamecenter.entity.PrivacyPolicyEntity;
|
||||
import com.gh.gamecenter.manager.FilterManager;
|
||||
import com.gh.gamecenter.retrofit.BiResponse;
|
||||
import com.gh.gamecenter.retrofit.RetrofitManager;
|
||||
import com.gh.gamecenter.user.UserRepository;
|
||||
import com.halo.assistant.HaloApp;
|
||||
import com.lightgame.download.DownloadEntity;
|
||||
import com.lightgame.download.FileUtils;
|
||||
@ -59,9 +56,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.functions.BiConsumer;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import pub.devrel.easypermissions.AfterPermissionGranted;
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
@ -93,22 +88,17 @@ public class SplashScreenActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
isNewFirstLaunch = mSharedPreferences.getBoolean("isNewFirstLaunchV" + PackageUtils.getVersionName(), true);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
UserRepository.getInstance(getApplication()); // 初始化登录
|
||||
|
||||
// 处理助手已经在后台运行导致的再次启动助手
|
||||
if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
TimestampUtils.initMap();
|
||||
|
||||
// 判断是不是这个版本的新用户
|
||||
if (isNewFirstLaunch) {
|
||||
// 删除更新后的光环助手包
|
||||
@ -216,15 +206,11 @@ public class SplashScreenActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
|
||||
final int layoutId;
|
||||
if (isNewFirstLaunch) {
|
||||
layoutId = R.layout.activity_splash_intro;
|
||||
return R.layout.activity_splash_intro;
|
||||
} else {
|
||||
layoutId = R.layout.activity_splash_normal;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return layoutId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -239,6 +225,16 @@ public class SplashScreenActivity extends BaseActivity {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean useEventBus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean useButterKnife() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 跳转到主界面
|
||||
private void launchMainActivity() {
|
||||
getUniqueId();
|
||||
|
||||
Reference in New Issue
Block a user