diff --git a/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts b/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts index b88e8a05dfdad5a160f0bcb1b0b859483db5dc74..36de38e0a25df74ecc2e543c349bc2deb7249dfb 100644 --- a/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts +++ b/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts @@ -51,9 +51,7 @@ export class LocationService { Log.showInfo(TAG, 'stopService'); this.mIsStart = false; try { - geolocation.off('locationEnabledChange', (state: boolean) => { - Log.showInfo(TAG, `stopService locationChange, state: ${JSON.stringify(state)}`) - }); + geolocation.off('locationEnabledChange'); } catch { Log.showError(TAG, 'geolocation.off try-catch error'); }