Switch to alarm manager for more control over polling

This commit is contained in:
M66B
2020-01-10 11:23:42 +01:00
parent 821f713728
commit 7658047300
6 changed files with 75 additions and 150 deletions

View File

@@ -819,19 +819,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
if (intent.getBooleanExtra("refresh", false)) {
intent.removeExtra("refresh");
setIntent(intent);
new SimpleTask<Void>() {
@Override
protected Void onExecute(Context context, Bundle args) {
WorkerPoll.sync(context, null);
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Log.unexpectedError(getSupportFragmentManager(), ex);
}
}.execute(this, new Bundle(), "view:refresh");
ServiceSynchronize.poll(this, null);
}
String action = intent.getAction();