Always run VACUUM on boot/update

This commit is contained in:
M66B 2019-07-26 09:07:41 +02:00
parent de963c56b7
commit 4d3f19c5b3
1 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,9 @@ package eu.faircode.email;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import androidx.preference.PreferenceManager;
import static android.os.Process.THREAD_PRIORITY_BACKGROUND; import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
@ -32,6 +35,9 @@ public class ReceiverAutoStart extends BroadcastReceiver {
Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction())) { Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction())) {
Log.i("Received " + intent); Log.i("Received " + intent);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit().remove("last_vacuum").apply();
ServiceSynchronize.boot(context); ServiceSynchronize.boot(context);
ServiceSend.boot(context); ServiceSend.boot(context);