+ overridePendingTransition(R.anim.fade_in_slowly, R.anim.fade_out_slowly);
+ }
+ else {
+ Logger.debug("splash", "Not running, finish and go away");
+ finish();
+ }
+ }
+ private static class DatabaseInitTask extends AsyncTask<Void, Void, Void> {
+ @Override
+ protected Void doInBackground(Void... voids) {
+ MobileLedgerProfile.loadAllFromDB(null);
+
+ String profileUUID = MLDB.getOption(MLDB.OPT_PROFILE_UUID, null);
+ MobileLedgerProfile startupProfile = Data.getProfile(profileUUID);
+ if (startupProfile != null)
+ Data.postCurrentProfile(startupProfile);
+ return null;
+ }
+ @Override
+ protected void onPostExecute(Void aVoid) {
+ Logger.debug("splash", "DatabaseInitTask::onPostExecute()");
+ super.onPostExecute(aVoid);
+ MobileLedgerDatabase.initComplete.setValue(true);
+ }