1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +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();
Log.i("Main boot");
final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() {
@Override
protected void onPreExecute(Bundle args) {
getMainHandler().postDelayed(new Runnable() {
final Runnable splash = new Runnable() {
@Override
public void run() {
getWindow().setBackgroundDrawableResource(R.drawable.splash);
}
}, SPLASH_DELAY);
};
final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() {
@Override
protected void onPreExecute(Bundle args) {
getMainHandler().postDelayed(splash, SPLASH_DELAY);
}
@Override
protected void onPostExecute(Bundle args) {
getMainHandler().removeCallbacks(splash);
getWindow().setBackgroundDrawable(null);
}
@Override