mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-15 00:21:10 +00:00
Cleanup
This commit is contained in:
parent
818045528f
commit
3084506c81
1 changed files with 0 additions and 15 deletions
|
@ -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…
Add table
Reference in a new issue