TrackRecordingService: move BluetoothRemoteSensorManager and AltitudeSumManager to HandlerServer.

Part of #822.
This commit is contained in:
Dennis Guse
2021-07-12 21:22:28 +02:00
parent 7f618da7a6
commit 223ad70d36
7 changed files with 101 additions and 82 deletions
@@ -33,14 +33,15 @@ class LocationHandler implements LocationListener, GpsStatus.GpsStatusListener {
this.handlerServer = handlerServer;
}
public void onStart(@NonNull Context context) {
public void onStart(@NonNull Context context, SharedPreferences sharedPreferences) {
onSharedPreferenceChanged(context, sharedPreferences, null);
gpsStatus = new GpsStatus(context, this);
locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
registerLocationListener();
gpsStatus.start();
}
public void onStop(@NonNull Context context) {
public void onStop() {
unregisterLocationListener();
locationManager = null;
if (gpsStatus != null) {