I think there are two simple solutions:
1. move the lines
if (!service.needsAuth()){ resetLocalDatabase(); }
into the onPreferenceChangeListener
2. find an other way to enable or disable the server field depending on the selected sync service, without calling setServer() in OnCreate.
I think there are two simple solutions:
1. move the lines
if (!service. needsAuth( )){ atabase( );
resetLocalD
}
into the onPreferenceCha ngeListener
2. find an other way to enable or disable the server field depending on the selected sync service, without calling setServer() in OnCreate.