Commit 1d3ed795 authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Merge branch '5675-weather-fine-location' into 'master'

Use fine location for weather

See merge request !108
parents 53e4b09f 88bead5f
Pipeline #200046 passed with stage
in 10 minutes and 55 seconds
......@@ -201,7 +201,7 @@ public class WeatherPreferences extends PreferenceActivity implements
}
public static boolean hasLocationPermission(Context context) {
return context.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)
return context.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)
== PackageManager.PERMISSION_GRANTED;
}
......@@ -218,7 +218,7 @@ public class WeatherPreferences extends PreferenceActivity implements
mCustomWeatherLoc.setSummary(location);
} else {
if (!hasLocationPermission(mContext)) {
String[] permissions = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION};
String[] permissions = new String[]{Manifest.permission.ACCESS_FINE_LOCATION};
requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);
}
mCustomWeatherLoc.setSummary(R.string.weather_geolocated);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment