Splash if database busy

This commit is contained in:
M66B 2024-01-03 10:26:34 +01:00
parent 8a10003bcf
commit 364cf1b459
2 changed files with 11 additions and 8 deletions

View File

@ -26,7 +26,6 @@ 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 android.provider.Settings;
import android.view.LayoutInflater;
@ -218,19 +217,16 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() {
@Override
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
protected void onPostExecute(Bundle args) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S)
getMainHandler().removeCallbacks(splash);
getWindow().setBackgroundDrawable(null);
getMainHandler().removeCallbacks(splash);
}
@Override
protected Boolean onExecute(Context context, Bundle args) {
protected Boolean onExecute(Context context, Bundle args) throws InterruptedException {
DB db = DB.getInstance(context);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);

View File

@ -1,5 +1,12 @@
<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>
<bitmap
android:gravity="center"