Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);