Этот коммит содержится в:
Anton Tananaev
2012-08-26 12:12:10 +04:00
родитель 1da76e567f
Коммит 0c2d17d386
+6 -2
Просмотреть файл
@@ -124,10 +124,14 @@ public class TraccarService extends Service implements LocationListener {
@Override
public void onDestroy() {
// Close connection
connection.close();
if (connection) {
connection.close();
}
// Stop location updates
locationManager.removeUpdates(this);
if (locationManager) {
locationManager.removeUpdates(this);
}
// Report status
unregisterReceiver(updateReceiver);