Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!Utils.checkForExternalStorageAvailableAndDisplayErrorIfNot(this)) { return; } if (getIntent().getBooleanExtra(RESTART_INTENT, false)) { Intent restartIntent = getApplicationContext().getPackageManager().getLaunchIntentForPackage(getApplicationContext().getPackageName()); PendingIntent intent = PendingIntent.getActivity(getApplicationContext(), 0, restartIntent, PendingIntent.FLAG_CANCEL_CURRENT); AlarmManager manager = (AlarmManager) getApplicationContext().getSystemService(Context.ALARM_SERVICE); <START> manager.set(AlarmManager.RTC, System.currentTimeMillis() + restartDelayAfterAppClose, intent); <END> System.exit(2); } if (!BuildConfig.CREATE_AT_SCHOOL) { initializeFacebookSdk(); } PreferenceManager.setDefaultValues(this, R.xml.preferences, true); UtilUi.updateScreenWidthAndHeight(this); if (STANDALONE_MODE) { getActionBar().hide(); setContentView(R.layout.activity_main_menu_splashscreen); UtilZip.unzipProgram(this); loadStageProject(Constants.STANDALONE_PROJECT_NAME); } else { if (!DividerUtil.isActivated()) { setContentView(R.layout.activity_main_menu); } else { setContentView(R.layout.activity_main_menu_with_dividers); } IconsUtil.setMainMenuIconSize(getApplicationContext(), this.findViewById(android.R.id.content)); final ActionBar actionBar = getActionBar(); actionBar.setDisplayUseLogoEnabled(true); actionBar.setHomeButtonEnabled(false); actionBar.setDisplayHomeAsUpEnabled(false); actionBar.setTitle(R.string.app_name); findViewById(R.id.main_menu_button_continue).setEnabled(false); Uri loadExternalProjectUri = getIntent().getData(); getIntent().setData(null); if (loadExternalProjectUri != null) { loadProgramFromExternalSource(loadExternalProjectUri); } } TextSizeUtil.enlargeViewGroup((ViewGroup) getWindow().getDecorView().getRootView()); DividerUtil.setDivider(this, (LinearLayout) findViewById(R.id.main_menu_buttons_container)); }</code><technical_language>is reason this delay</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!Utils.checkForExternalStorageAvailableAndDisplayErrorIfNot(this)) { return; } if (getIntent().getBooleanExtra(RESTART_INTENT, false)) { Intent restartIntent = getApplicationContext().getPackageManager().getLaunchIntentForPackage(getApplicationContext().getPackageName()); PendingIntent intent = PendingIntent.getActivity(getApplicationContext(), 0, restartIntent, PendingIntent.FLAG_CANCEL_CURRENT); AlarmManager manager = (AlarmManager) getApplicationContext().getSystemService(Context.ALARM_SERVICE); manager.set(AlarmManager.RTC, System.currentTimeMillis() + restartDelayMsAfterAppClose, intent); System.exit(0); } if (!BuildConfig.CREATE_AT_SCHOOL) { initializeFacebookSdk(); } PreferenceManager.setDefaultValues(this, R.xml.preferences, true); UtilUi.updateScreenWidthAndHeight(this); if (STANDALONE_MODE) { getActionBar().hide(); setContentView(R.layout.activity_main_menu_splashscreen); UtilZip.unzipProgram(this); loadStageProject(Constants.STANDALONE_PROJECT_NAME); } else { if (!DividerUtil.isActivated()) { setContentView(R.layout.activity_main_menu); } else { setContentView(R.layout.activity_main_menu_with_dividers); } IconsUtil.setMainMenuIconSize(getApplicationContext(), this.findViewById(android.R.id.content)); final ActionBar actionBar = getActionBar(); actionBar.setDisplayUseLogoEnabled(true); actionBar.setHomeButtonEnabled(false); actionBar.setDisplayHomeAsUpEnabled(false); actionBar.setTitle(R.string.app_name); findViewById(R.id.main_menu_button_continue).setEnabled(false); Uri loadExternalProjectUri = getIntent().getData(); getIntent().setData(null); if (loadExternalProjectUri != null) { loadProgramFromExternalSource(loadExternalProjectUri); } } TextSizeUtil.enlargeViewGroup((ViewGroup) getWindow().getDecorView().getRootView()); DividerUtil.setDivider(this, (LinearLayout) findViewById(R.id.main_menu_buttons_container)); }