mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Use Android 12 splash screen
This commit is contained in:
@@ -25,6 +25,7 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
@@ -135,12 +136,14 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
|
||||
final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() {
|
||||
@Override
|
||||
protected void onPreExecute(Bundle args) {
|
||||
getMainHandler().postDelayed(splash, SPLASH_DELAY);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S)
|
||||
getMainHandler().postDelayed(splash, SPLASH_DELAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Bundle args) {
|
||||
getMainHandler().removeCallbacks(splash);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S)
|
||||
getMainHandler().removeCallbacks(splash);
|
||||
getWindow().setBackgroundDrawable(null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user