pull/169/head
M66B 5 years ago
parent 818045528f
commit 3084506c81

@ -158,21 +158,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (networkState == null || accountStates == null)
return;
if (Looper.myLooper() == Looper.getMainLooper())
_post(command, networkState, accountStates);
else {
// Some Android versions call onDestroy not on the main thread
Log.e("### not main thread states=" + accountStates.size());
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
_post(command, networkState, accountStates);
}
});
}
}
private void _post(Bundle command, ConnectionHelper.NetworkState networkState, List<TupleAccountState> accountStates) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ServiceSynchronize.this);
boolean enabled = prefs.getBoolean("enabled", true);
int pollInterval = prefs.getInt("poll_interval", 0);

Loading…
Cancel
Save