mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 21:58:48 +00:00
NearestFavoriteStationWidgetService: Guard ACCESS_BACKGROUND_LOCATION permission with an SDK check.
This commit is contained in:
parent
4839c5b65b
commit
7edfca2830
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ public class NearestFavoriteStationWidgetService extends JobIntentService {
|
|||
views = new RemoteViews(getPackageName(), R.layout.station_widget_content);
|
||||
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED ||
|
||||
ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
|
||||
final PendingIntent intent = PendingIntent.getActivity(this, 0, new Intent(this,
|
||||
NearestFavoriteStationsWidgetPermissionActivity.class), 0);
|
||||
widgetsMessage(appWidgetIds, getString(R.string.nearest_favorite_station_widget_no_location_permission), intent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue