[Android] Proper fix for the notification permission check
Nicolas Pomepuy
git at videolan.org
Wed Oct 26 08:56:13 UTC 2022
vlc-android | branch: 3.5.x | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Oct 26 07:53:47 2022 +0200| [705a410927b9901d20bf2af33181472578f3a8a1] | committer: Nicolas Pomepuy
Proper fix for the notification permission check
(cherry picked from commit 4b7262e7085212063beb99c97b8b236ff95c37ab)
> https://code.videolan.org/videolan/vlc-android/commit/705a410927b9901d20bf2af33181472578f3a8a1
---
application/vlc-android/src/org/videolan/vlc/util/Permissions.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/util/Permissions.kt b/application/vlc-android/src/org/videolan/vlc/util/Permissions.kt
index b845170b8..4fd9c2c81 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/Permissions.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/Permissions.kt
@@ -102,7 +102,7 @@ object Permissions {
Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED || isExternalStorageManager()
}
- fun canSendNotifications(context: Context) = Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU || ContextCompat.checkSelfPermission(context, "android.permission.POST_NOTIFICATIONS") == PackageManager.PERMISSION_GRANTED
+ fun canSendNotifications(context: Context) = Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2 || ContextCompat.checkSelfPermission(context, "android.permission.POST_NOTIFICATIONS") == PackageManager.PERMISSION_GRANTED
/**
* Check if the app has a complete access to the files especially on Android 11
More information about the Android
mailing list