mirror of https://github.com/M66B/FairEmail.git
parent
5856762748
commit
69ed0b6344
|
@ -136,10 +136,6 @@ public class ApplicationEx extends Application implements SharedPreferences.OnSh
|
||||||
|
|
||||||
DisconnectBlacklist.init(this);
|
DisconnectBlacklist.init(this);
|
||||||
|
|
||||||
ServiceSynchronize.boot(this);
|
|
||||||
ServiceSend.boot(this);
|
|
||||||
ServiceUI.boot(this);
|
|
||||||
|
|
||||||
boolean watchdog = prefs.getBoolean("watchdog", true);
|
boolean watchdog = prefs.getBoolean("watchdog", true);
|
||||||
boolean enabled = prefs.getBoolean("enabled", true);
|
boolean enabled = prefs.getBoolean("enabled", true);
|
||||||
if (watchdog && enabled)
|
if (watchdog && enabled)
|
||||||
|
|
|
@ -26,12 +26,16 @@ import android.content.Intent;
|
||||||
public class ReceiverAutoStart extends BroadcastReceiver {
|
public class ReceiverAutoStart extends BroadcastReceiver {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(final Context context, Intent intent) {
|
public void onReceive(final Context context, Intent intent) {
|
||||||
|
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction()) ||
|
||||||
|
Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction())) {
|
||||||
Log.i("Received " + intent);
|
Log.i("Received " + intent);
|
||||||
|
|
||||||
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction()))
|
|
||||||
; // handled by Application
|
|
||||||
|
|
||||||
if (Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction()))
|
if (Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction()))
|
||||||
ApplicationEx.upgrade(context);
|
ApplicationEx.upgrade(context);
|
||||||
|
|
||||||
|
ServiceSynchronize.boot(context);
|
||||||
|
ServiceSend.boot(context);
|
||||||
|
ServiceUI.boot(context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue