Skip to content

Commit c988d12

Browse files
committed
Add deprecated and requiresApi annotations
This is to flag that these should be cleaned up when support for Android API 22 and older is dropped.
1 parent c28ed78 commit c988d12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/GenerateNotificationOpenIntent.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.onesignal
33
import android.app.PendingIntent
44
import android.content.Context
55
import android.content.Intent
6+
import androidx.annotation.RequiresApi
67

78
class GenerateNotificationOpenIntent(
89
private val context: Context,
@@ -35,6 +36,7 @@ class GenerateNotificationOpenIntent(
3536
)
3637
}
3738

39+
@RequiresApi(android.os.Build.VERSION_CODES.M)
3840
private fun getNewBaseIntentAndroidAPI23Plus(): Intent {
3941
return Intent(
4042
context,
@@ -43,6 +45,7 @@ class GenerateNotificationOpenIntent(
4345
}
4446

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

0 commit comments

Comments
 (0)