mirror of https://github.com/M66B/FairEmail.git
Always run VACUUM on boot/update
This commit is contained in:
parent
de963c56b7
commit
4d3f19c5b3
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue