]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/SplashActivity.java
fixed a hard to reproduce crash upon returning to the app
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / SplashActivity.java
index 921abb7512f7363ed0bca78ea6a140e28d45cd46..4205c80b5775084c898792bdca8c3115479b0bee 100644 (file)
@@ -22,7 +22,6 @@ import android.os.AsyncTask;
 import android.os.Bundle;
 import android.os.Handler;
 
-import androidx.activity.ComponentActivity;
 import androidx.annotation.Nullable;
 
 import net.ktnx.mobileledger.R;
@@ -32,8 +31,8 @@ import net.ktnx.mobileledger.utils.Logger;
 import net.ktnx.mobileledger.utils.MLDB;
 import net.ktnx.mobileledger.utils.MobileLedgerDatabase;
 
-public class SplashActivity extends ComponentActivity {
-    private static final long keepActiveForMS = 500;
+public class SplashActivity extends CrashReportingActivity {
+    private static final long keepActiveForMS = 400;
     private long startupTime;
     private boolean running = true;
     @Override
@@ -106,7 +105,7 @@ public class SplashActivity extends ComponentActivity {
             String profileUUID = MLDB.getOption(MLDB.OPT_PROFILE_UUID, null);
             MobileLedgerProfile startupProfile = Data.getProfile(profileUUID);
             if (startupProfile != null)
-                Data.setCurrentProfile(startupProfile);
+                Data.postCurrentProfile(startupProfile);
             return null;
         }
         @Override