title: Location spoofer breaks geolocator?
body: <p>I'm using the geolocator package to get the current location of a device. I recently installed a location <a href="https://play.google.com/store/apps/details?id=com.incorporateapps.fakegps.fre&amp;hl=en_SG&amp;gl=US" rel="nofollow noreferrer">Spoofer app</a> to test some features .</p>
  <p>However, upon using the spoofer, geolocator seems to break? It never returns a location whenever I try to get a location.</p>
  <p>How do I resolve this issue? Thank you for your help!</p>
  <p>(the problem is that the location no longer returns even after I uninstall the location spoofer. The GPS functions for my app no longer work on the device)</p>
  <p>Heres the function I call whenever I try to get a location</p>
  <pre><code>Future&lt;Position&gt; getCurrentLocation() async {
    bool serviceEnabled;
    LocationPermission permission;
    Position position;
    // ignore: await_only_futures
    serviceEnabled = await Geolocator.isLocationServiceEnabled();
    if (!serviceEnabled) {
        // ignore: await_only_futures
      await requestLocation();
      serviceEnabled = await Geolocator.isLocationServiceEnabled();
      if (!serviceEnabled) {
        callSnackbar('Error', 'Location services are disabled');
        return Future.error('Location services are disabled.');
      }
    }
  
    permission = await Geolocator.checkPermission();
    if (permission == LocationPermission.deniedForever) {
      callSnackbar('Error',
          'Location permissions are permantly denied, we cannot request permissions');
  
      return Future.error(
          'Location permissions are permantly denied, we cannot request permissions.');
    }
  
    if (permission == LocationPermission.denied) {
      permission = await Geolocator.requestPermission();
      if (permission != LocationPermission.whileInUse &amp;&amp;
          permission != LocationPermission.always) {
        callSnackbar('Error',
            'Location permissions are denied (actual value: $permission)');
        return Future.error(
            'Location permissions are denied (actual value: $permission).');
      }
    }
    print('LOGIC');
    position = await Geolocator.getCurrentPosition();
    if (position == null) {
      print('null');
    } else {
      print('LOCATION');
      print(position);
    }
    return position;
  }
  </code></pre>
  <p>and heres an example of me calling the function:</p>
  <pre><code>                    getCurrentLocation().then((contents) {
                        print('getting location');
                        print(contents.latitude);
                        );
                      }, onError: (e) {}).timeout(const Duration(seconds: 5),
                          onTimeout: () {
                        callSnackbar('Error', 'Couldn\'t get location');
                      });
  </code></pre>
  <p>the above code works fine until I install and use a location spoofer app. So even after the uninstall, the app no longer works and just timeouts because the future does not return.</p>