Ensure that provider is correct

Этот коммит содержится в:
Anton Tananaev
2015-08-17 14:22:13 +12:00
родитель 50e6c00bd0
Коммит 0850ac09b0
+5 -1
Просмотреть файл
@@ -55,8 +55,12 @@ public class PositionProvider implements LocationListener {
locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
deviceId = preferences.getString(MainActivity.KEY_DEVICE, null);
type = preferences.getString(MainActivity.KEY_PROVIDER, null);
period = Integer.parseInt(preferences.getString(MainActivity.KEY_INTERVAL, null)) * 1000;
type = preferences.getString(MainActivity.KEY_PROVIDER, null);
if (!type.equals(LocationManager.NETWORK_PROVIDER)) {
type = LocationManager.GPS_PROVIDER;
}
}
public void startUpdates() {