mirror of https://github.com/M66B/FairEmail.git
Splash if database busy
This commit is contained in:
parent
8a10003bcf
commit
364cf1b459
|
@ -26,7 +26,6 @@ import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -218,19 +217,16 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
|
||||||
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) {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S)
|
|
||||||
getMainHandler().postDelayed(splash, SPLASH_DELAY);
|
getMainHandler().postDelayed(splash, SPLASH_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Bundle args) {
|
protected void onPostExecute(Bundle args) {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S)
|
|
||||||
getMainHandler().removeCallbacks(splash);
|
getMainHandler().removeCallbacks(splash);
|
||||||
getWindow().setBackgroundDrawable(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean onExecute(Context context, Bundle args) {
|
protected Boolean onExecute(Context context, Bundle args) throws InterruptedException {
|
||||||
DB db = DB.getInstance(context);
|
DB db = DB.getInstance(context);
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@android:color/darker_gray" />
|
<item
|
||||||
|
android:width="200dp"
|
||||||
|
android:height="200dp">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@android:color/darker_gray" />
|
||||||
|
<corners android:radius="400px" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<bitmap
|
<bitmap
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
|
Loading…
Reference in New Issue