Skip to content

Commit 38dc0c3

Browse files
cypheropdomdomegg
authored andcommitted
Fix commons-app#2634: Prevent incorrect dialog from appearing if non-GPS location is enabled (commons-app#2635)
* Prevent dialog from appearing if location is enabled * Update Javadoc
1 parent 31c6888 commit 38dc0c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/fr/free/nrw/commons/location/LocationServiceManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ public LocationServiceManager(Context context) {
4545
}
4646

4747
/**
48-
* Returns the current status of the GPS provider.
48+
* Returns the current status of the location provider.
4949
*
50-
* @return true if the GPS provider is enabled
50+
* @return true if the location provider is enabled
5151
*/
5252
public boolean isProviderEnabled() {
53-
return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
53+
return (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) || locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER));
5454
}
5555

5656
/**

0 commit comments

Comments
 (0)