Fix #2634: Prevent incorrect dialog from appearing if non-GPS location is enabled (#2635)

* Prevent dialog from appearing if location is enabled
* Update Javadoc
This commit is contained in:
Shubham Pinjwani 2019-03-18 02:11:46 +05:30 committed by Adam Jones
parent 31c688860d
commit 38dc0c3fc8

View file

@ -45,12 +45,12 @@ public class LocationServiceManager implements LocationListener {
}
/**
* Returns the current status of the GPS provider.
* Returns the current status of the location provider.
*
* @return true if the GPS provider is enabled
* @return true if the location provider is enabled
*/
public boolean isProviderEnabled() {
return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
return (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) || locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER));
}
/**