diff options
Diffstat (limited to 'android/2.1/GnssGeofencing.cpp')
-rw-r--r-- | android/2.1/GnssGeofencing.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/android/2.1/GnssGeofencing.cpp b/android/2.1/GnssGeofencing.cpp index d309731..35a641a 100644 --- a/android/2.1/GnssGeofencing.cpp +++ b/android/2.1/GnssGeofencing.cpp @@ -36,7 +36,7 @@ void GnssGeofencing::GnssGeofencingDeathRecipient::serviceDied( __FUNCTION__, static_cast<unsigned long long>(cookie), &who); auto gnssGeofencing = mGnssGeofencing.promote(); if (gnssGeofencing != nullptr) { - gnssGeofencing->removeAllGeofences(); + gnssGeofencing->handleClientDeath(); } } @@ -47,6 +47,15 @@ GnssGeofencing::~GnssGeofencing() { } } +void GnssGeofencing::handleClientDeath() { + + removeAllGeofences(); + if (mApi != nullptr) { + mApi->upcateCallback(nullptr); + } + mGnssGeofencingCbIface = nullptr; +} + // Methods from ::android::hardware::gnss::V1_0::IGnssGeofencing follow. Return<void> GnssGeofencing::setCallback(const sp<IGnssGeofenceCallback>& callback) { if (mGnssGeofencingDeathRecipient == nullptr) { |