Skip to content

Commit

Permalink
Use RequiresApi instead of TargetApi in NotificationManager
Browse files Browse the repository at this point in the history
  • Loading branch information
rvandermeulen authored and mergify[bot] committed Dec 3, 2024
1 parent 58647a9 commit c3cc251
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package org.mozilla.reference.browser

import android.annotation.TargetApi
import android.app.Notification
import android.app.NotificationChannel
import android.app.PendingIntent
Expand All @@ -14,6 +13,7 @@ import android.content.SharedPreferences
import android.net.Uri
import android.os.Build
import android.os.Build.VERSION.SDK_INT
import androidx.annotation.RequiresApi
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.preference.PreferenceManager
Expand Down Expand Up @@ -178,7 +178,7 @@ object NotificationManager {
return channelId
}

@TargetApi(Build.VERSION_CODES.O)
@RequiresApi(Build.VERSION_CODES.O)
private fun createNotificationChannelIfNeeded(
context: Context,
channelId: String,
Expand Down

0 comments on commit c3cc251

Please sign in to comment.