Fix lint warning.

This commit is contained in:
Benoit Marty 2022-10-07 10:05:48 +02:00 committed by Benoit Marty
parent 35dcfdd54b
commit d4de559809

View File

@ -21,6 +21,7 @@ import android.app.Activity
import android.content.pm.PackageManager
import android.os.Build
import androidx.activity.result.ActivityResultLauncher
import androidx.annotation.ChecksSdkIntAtLeast
import androidx.annotation.RequiresApi
import androidx.core.content.ContextCompat
import im.vector.app.R
@ -34,6 +35,7 @@ class NotificationPermissionManager @Inject constructor(
private val vectorPreferences: VectorPreferences,
) {
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.TIRAMISU)
fun isPermissionGranted(activity: Activity): Boolean {
return if (sdkIntProvider.isAtLeast(Build.VERSION_CODES.TIRAMISU)) {
ContextCompat.checkSelfPermission(