首次启动去除自动跳转至首页
This commit is contained in:
@ -135,14 +135,14 @@ public class SplashScreenActivity extends BaseActivity {
|
||||
}
|
||||
} else {
|
||||
setTheme(R.style.AppFullScreenTheme);
|
||||
launchMainActivity();
|
||||
|
||||
getWindow().getDecorView().postDelayed(this::launchMainActivity, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
private void requestPermissionAndLaunchMainActivity() {
|
||||
if (EasyPermissions.hasPermissions(this, mPermissions)) {
|
||||
GdtHelper.INSTANCE.logAction(ActionType.START_APP, GdtHelper.NETWORK_TYPE, DeviceUtils.getNetwork(this));
|
||||
launchMainActivity();
|
||||
} else {
|
||||
checkAndRequestPermission();
|
||||
}
|
||||
@ -205,14 +205,11 @@ public class SplashScreenActivity extends BaseActivity {
|
||||
private void launchMainActivity() {
|
||||
getUniqueId();
|
||||
|
||||
long delay = isNewFirstLaunch ? 2000 : 1000;
|
||||
getWindow().getDecorView().postDelayed(() -> {
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
|
||||
if (bundle != null) intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}, delay);
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
|
||||
if (bundle != null) intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
private void getUniqueId() {
|
||||
@ -257,7 +254,6 @@ public class SplashScreenActivity extends BaseActivity {
|
||||
@AfterPermissionGranted(REQUEST_PERMISSION_TAG)
|
||||
private void checkAndRequestPermission() {
|
||||
if (EasyPermissions.hasPermissions(this, mPermissions)) {
|
||||
launchMainActivity();
|
||||
MtaHelper.onEvent("授权情况", "启动授权", "都授权");
|
||||
// 检查是否有旧版本光环,有就删掉
|
||||
HaloApp.getInstance().getMainExecutor().execute(this::checkOldGhFile);
|
||||
|
||||
Reference in New Issue
Block a user