mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Start foreground on create
Sometimes there is a significant delay between on create and on start command
This commit is contained in:
@@ -72,6 +72,7 @@ public class ServiceSend extends ServiceBase {
|
||||
public void onCreate() {
|
||||
Log.i("Service send create");
|
||||
super.onCreate();
|
||||
startForeground(Helper.NOTIFICATION_SEND, getNotificationService(null, null).build());
|
||||
|
||||
cowner = new TwoStateOwner(ServiceSend.this, "send");
|
||||
final DB db = DB.getInstance(this);
|
||||
@@ -223,10 +224,7 @@ public class ServiceSend extends ServiceBase {
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
startForeground(Helper.NOTIFICATION_SEND, getNotificationService(null, null).build());
|
||||
|
||||
super.onStartCommand(intent, flags, startId);
|
||||
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user