mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 11:55:20 +01:00
Revert "Switch to alarm manager for more control over polling"
This reverts commit 7658047300.
This commit is contained in:
@@ -20,6 +20,7 @@ package eu.faircode.email;
|
||||
*/
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Build;
|
||||
@@ -96,6 +97,12 @@ public class ServiceTileUnseen extends TileService {
|
||||
|
||||
public void onClick() {
|
||||
Log.i("Click tile unseen");
|
||||
ServiceSynchronize.poll(this, null);
|
||||
final Context context = getApplicationContext();
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WorkerPoll.sync(context, null);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user