mirror of
https://github.com/Michatec/Radio.git
synced 2026-05-31 03:02:39 +02:00
refactor(android): simplify notification permission request
Remove the explicit permission type from the `RequestPermission` contract in `MainActivity` to rely on default behavior or internal contract handling.
This commit is contained in:
@@ -42,7 +42,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
// request notification permission (for Android 13+)
|
// request notification permission (for Android 13+)
|
||||||
private val permissionLauncher = registerForActivityResult(
|
private val permissionLauncher = registerForActivityResult(
|
||||||
ActivityResultContracts.RequestPermission(Manifest.permission.POST_NOTIFICATIONS)
|
ActivityResultContracts.RequestPermission()
|
||||||
) { isGranted ->
|
) { isGranted ->
|
||||||
if (!isGranted) {
|
if (!isGranted) {
|
||||||
Snackbar.make(
|
Snackbar.make(
|
||||||
|
|||||||
Reference in New Issue
Block a user