diff --git a/app/src/main/java/eu/faircode/email/ActivityMain.java b/app/src/main/java/eu/faircode/email/ActivityMain.java index 4ebd5697f2..2df5b1ad0f 100644 --- a/app/src/main/java/eu/faircode/email/ActivityMain.java +++ b/app/src/main/java/eu/faircode/email/ActivityMain.java @@ -125,15 +125,23 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack long start = new Date().getTime(); Log.i("Main boot"); + final Runnable splash = new Runnable() { + @Override + public void run() { + getWindow().setBackgroundDrawableResource(R.drawable.splash); + } + }; + final SimpleTask boot = new SimpleTask() { @Override protected void onPreExecute(Bundle args) { - getMainHandler().postDelayed(new Runnable() { - @Override - public void run() { - getWindow().setBackgroundDrawableResource(R.drawable.splash); - } - }, SPLASH_DELAY); + getMainHandler().postDelayed(splash, SPLASH_DELAY); + } + + @Override + protected void onPostExecute(Bundle args) { + getMainHandler().removeCallbacks(splash); + getWindow().setBackgroundDrawable(null); } @Override