1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Cancel splash runnable

This commit is contained in:
M66B 2021-08-24 16:38:22 +02:00
parent 667b7666df
commit 1396b2799a

View file

@ -125,15 +125,23 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
long start = new Date().getTime(); long start = new Date().getTime();
Log.i("Main boot"); Log.i("Main boot");
final Runnable splash = new Runnable() {
@Override
public void run() {
getWindow().setBackgroundDrawableResource(R.drawable.splash);
}
};
final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() { final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() {
@Override @Override
protected void onPreExecute(Bundle args) { protected void onPreExecute(Bundle args) {
getMainHandler().postDelayed(new Runnable() { getMainHandler().postDelayed(splash, SPLASH_DELAY);
@Override }
public void run() {
getWindow().setBackgroundDrawableResource(R.drawable.splash); @Override
} protected void onPostExecute(Bundle args) {
}, SPLASH_DELAY); getMainHandler().removeCallbacks(splash);
getWindow().setBackgroundDrawable(null);
} }
@Override @Override