forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
5d3f153141
commit
8c60dd29f2
2 changed files with 9 additions and 5 deletions
|
@ -255,6 +255,10 @@ public enum LocationHelper
|
|||
|
||||
public void initProvider(boolean forceNative)
|
||||
{
|
||||
mActive = !mListeners.isEmpty();
|
||||
if (mActive)
|
||||
stopInternal();
|
||||
|
||||
final MwmApplication application = MwmApplication.get();
|
||||
final boolean containsGoogleServices = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(application) == ConnectionResult.SUCCESS;
|
||||
final boolean googleServicesTurnedInSettings = Config.useGoogleServices();
|
||||
|
|
|
@ -52,11 +52,11 @@ public class MiscPrefsFragment extends BaseXmlSettingsFragment
|
|||
{
|
||||
boolean oldVal = Config.useGoogleServices();
|
||||
boolean newVal = ((Boolean) newValue).booleanValue();
|
||||
if (oldVal == newVal)
|
||||
return true;
|
||||
|
||||
Config.setUseGoogleService(newVal);
|
||||
LocationHelper.INSTANCE.initProvider(false);
|
||||
if (oldVal != newVal)
|
||||
{
|
||||
Config.setUseGoogleService(newVal);
|
||||
LocationHelper.INSTANCE.initProvider(false /* forceNative */);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue