michalchudziak / react-native-geolocation

Geolocation APIs for React Native
MIT License
1.28k stars 220 forks source link

Fix a bug with negative distance filter passed to options #246

Closed michalchudziak closed 1 year ago

michalchudziak commented 1 year ago

Overview

A fix for: https://github.com/transistorsoft/react-native-background-geolocation/issues/893 for some reason on Android 8, there ale calls to this function with a negative value preceding the correct call. This condition ensures that no negative value is ever passed to the setSmallestDisplacement method, as it crashes in such cases.