Add ACCESS_BACKGROUND_LOCATION permission required by Android 11.

This commit is contained in:
azuo
2021-09-13 19:28:47 +08:00
parent 8c84913cd8
commit d3b623cf13
7 changed files with 87 additions and 75 deletions

View File

@ -42,6 +42,13 @@ class WeatherNetworkApi(val context: Context) {
Constants.WeatherProvider.YR -> useYrProvider(context)
}
} else {
if (!Preferences.showWeather)
Preferences.weatherProviderError = context.getString(R.string.show_weather_not_visible)
else {
Preferences.weatherProviderLocationError = context.getString(R.string.weather_provider_error_missing_location)
Preferences.weatherProviderError = ""
}
WeatherHelper.removeWeather(
context
)