mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Fix lint warning.
This commit is contained in:
parent
35dcfdd54b
commit
d4de559809
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user