From 88bead5f192dbb5a8cfdc12961ed9665192789c7 Mon Sep 17 00:00:00 2001 From: Suphon Thanakornpakapong Date: Mon, 27 Jun 2022 21:13:28 +0700 Subject: [PATCH] Use fine location for weather --- .../e/blisslauncher/features/weather/WeatherPreferences.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherPreferences.java b/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherPreferences.java index 4952ceed51..5fcf7231a4 100644 --- a/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherPreferences.java +++ b/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherPreferences.java @@ -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); -- GitLab