Files
AntennaPod/storage/preferences
Joshua Ishal, DDS e839f25c84 Hide persistent playback controls preference on Android 11+ (#8398)
### Description

Hides the "Persistent playback controls" preference from the User
Interface settings screen when running on Android 11 (API 30) or newer.
Starting with Android 11, notification persistence for media sessions is
handled system-wide, so the app-level toggle is a no-op on modern
devices and can be confusing to users.

The change follows the existing pattern used for
`PREF_EXPANDED_NOTIFICATION`, which is hidden on API 26+ for the same
reason (notification channels superseded it).

On Android < 11 the preference remains visible and functional. On
Android 11+, `isPersistNotify()` continues to return its default
(`true`), so no behavioral regression for existing users.

One incidental change: `PREF_PERSISTENT_NOTIFICATION` was previously
`private` in `UserPreferences`; I changed it to `public` so
`UserInterfacePreferencesFragment` can reference it for visibility
control (matches the visibility of the adjacent
`PREF_EXPANDED_NOTIFICATION` constant).

Closes: #6809

### Checklist
- [x] I have read the contribution guidelines:
https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request
- [x] I have performed a self-review of my code, going through my
changes line by line and carefully considering why this line change is
necessary
- [x] I have run the automated code checks using \`./gradlew checkstyle
lint spotbugsPlayDebug spotbugsDebug\`
- [x] My code follows the style guidelines of the AntennaPod project:
https://antennapod.org/contribute/develop/app/code-style
- [x] I have mentioned the corresponding issue and the relevant keyword
(e.g., "Closes: #xy") in the description (see
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
- [ ] If it is a core feature, I have added automated tests — N/A,
visibility-only change based on `Build.VERSION.SDK_INT`; behavior is
framework-gated and not meaningfully unit-testable.
2026-04-19 15:40:43 +02:00
..
2023-10-17 20:52:21 +02:00
2026-04-19 15:11:38 +02:00

:storage:preferences

User settings, but not the actual subscription database. Settings are accessed through static methods on classes like UserPreferences, which wrap Android SharedPreferences.