Skip to content
Snippets Groups Projects
Commit 705a4109 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Proper fix for the notification permission check

(cherry picked from commit 4b7262e7)
parent 76baa8da
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment