Avoid uninitialized provider type
Этот коммит содержится в:
@@ -57,7 +57,7 @@ public abstract class PositionProvider {
|
||||
deviceId = preferences.getString(MainActivity.KEY_DEVICE, null);
|
||||
period = Integer.parseInt(preferences.getString(MainActivity.KEY_INTERVAL, null)) * 1000;
|
||||
|
||||
type = preferences.getString(MainActivity.KEY_PROVIDER, null);
|
||||
type = preferences.getString(MainActivity.KEY_PROVIDER, "gps");
|
||||
}
|
||||
|
||||
public abstract void startUpdates();
|
||||
|
||||
@@ -64,7 +64,7 @@ public class TrackingController implements PositionProvider.PositionListener, Ne
|
||||
this.context = context;
|
||||
handler = new Handler();
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (preferences.getString(MainActivity.KEY_PROVIDER, null).equals("mixed")) {
|
||||
if (preferences.getString(MainActivity.KEY_PROVIDER, "gps").equals("mixed")) {
|
||||
positionProvider = new MixedPositionProvider(context, this);
|
||||
} else {
|
||||
positionProvider = new SimplePositionProvider(context, this);
|
||||
|
||||
Ссылка в новой задаче
Block a user