Skip to content

Commit

Permalink
Add deprecated and requiresApi annotations
Browse files Browse the repository at this point in the history
This is to flag that these should be cleaned up when support for
Android API 22 and older is dropped.
  • Loading branch information
jkasten2 committed Oct 27, 2021
1 parent c28ed78 commit c988d12
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.onesignal
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import androidx.annotation.RequiresApi

class GenerateNotificationOpenIntent(
private val context: Context,
Expand Down Expand Up @@ -35,6 +36,7 @@ class GenerateNotificationOpenIntent(
)
}

@RequiresApi(android.os.Build.VERSION_CODES.M)
private fun getNewBaseIntentAndroidAPI23Plus(): Intent {
return Intent(
context,
Expand All @@ -43,6 +45,7 @@ class GenerateNotificationOpenIntent(
}

// See NotificationOpenedReceiverAndroid22AndOlder.java for details
@Deprecated("Use getNewBaseIntentAndroidAPI23Plus instead for Android 6+")
private fun getNewBaseIntentAndroidAPI22AndOlder(): Intent {
val intent = Intent(
context,
Expand Down

0 comments on commit c988d12

Please sign in to comment.