Checks in onDestroy (fix #5)
Этот коммит содержится в:
@@ -124,10 +124,14 @@ public class TraccarService extends Service implements LocationListener {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
// Close connection
|
||||
if (connection) {
|
||||
connection.close();
|
||||
}
|
||||
|
||||
// Stop location updates
|
||||
if (locationManager) {
|
||||
locationManager.removeUpdates(this);
|
||||
}
|
||||
|
||||
// Report status
|
||||
unregisterReceiver(updateReceiver);
|
||||
|
||||
Ссылка в новой задаче
Block a user