Revert "Switch to alarm manager for more control over polling"

This reverts commit 7658047300.
This commit is contained in:
M66B
2020-01-10 12:08:14 +01:00
parent 7658047300
commit 9306d4e1e9
6 changed files with 150 additions and 75 deletions

View File

@@ -819,7 +819,19 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
if (intent.getBooleanExtra("refresh", false)) {
intent.removeExtra("refresh");
setIntent(intent);
ServiceSynchronize.poll(this, null);
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");
}
String action = intent.getAction();