summaryrefslogtreecommitdiff
path: root/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-04-22 17:32:10 -0400
committerKeith Packard <keithp@keithp.com>2016-04-22 18:49:35 -0400
commit39af826ce9032e339929eb7917b1d29c87d03f69 (patch)
treec9f265d6c4dd54c562c54e2c41e7719f1125a857 /altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
parentb3f0c4d5c4ab8288db5fcabb0e848627031c4fd1 (diff)
altosdroid: Track device location in app, not telemetry service
This means we get location even if there isn't a telemetry device connected, making it possible to walk to old device locations Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java')
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java30
1 files changed, 1 insertions, 29 deletions
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
index 63592e29..1834d55b 100644
--- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
+++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
@@ -38,14 +38,11 @@ import android.os.Messenger;
import android.os.RemoteException;
import android.os.Looper;
import android.widget.Toast;
-import android.location.Location;
-import android.location.LocationManager;
-import android.location.LocationListener;
import android.location.Criteria;
import org.altusmetrum.altoslib_10.*;
-public class TelemetryService extends Service implements LocationListener {
+public class TelemetryService extends Service {
static final int MSG_REGISTER_CLIENT = 1;
static final int MSG_UNREGISTER_CLIENT = 2;
@@ -484,11 +481,6 @@ public class TelemetryService extends Service implements LocationListener {
telemetry_state.states.put(serial, saved_state.state);
}
}
-
- // Listen for GPS and Network position updates
- LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
-
- locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1, this);
}
@Override
@@ -535,9 +527,6 @@ public class TelemetryService extends Service implements LocationListener {
@Override
public void onDestroy() {
- // Stop listening for location updates
- ((LocationManager) getSystemService(Context.LOCATION_SERVICE)).removeUpdates(this);
-
// Stop the bluetooth Comms threads
disconnect(true);
@@ -552,21 +541,4 @@ public class TelemetryService extends Service implements LocationListener {
public IBinder onBind(Intent intent) {
return messenger.getBinder();
}
-
-
- public void onLocationChanged(Location location) {
- telemetry_state.location = location;
- AltosDebug.debug("location changed");
- send_to_clients();
- }
-
- public void onStatusChanged(String provider, int status, Bundle extras) {
- }
-
- public void onProviderEnabled(String provider) {
- }
-
- public void onProviderDisabled(String provider) {
- }
-
}