Skip to content

Commit

Permalink
Update AGP to 8.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnm committed Oct 3, 2023
1 parent 100edc9 commit 55a81d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,28 @@

package com.datadog.android.core.internal.receiver

import android.annotation.SuppressLint
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import java.util.concurrent.atomic.AtomicBoolean

internal abstract class ThreadSafeReceiver : BroadcastReceiver() {

val isRegistered = AtomicBoolean(false)

@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun registerReceiver(
context: Context,
filter: IntentFilter
): Intent? {
val intent = context.registerReceiver(this, filter)
val intent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(this, filter, Context.RECEIVER_NOT_EXPORTED)
} else {
context.registerReceiver(this, filter)
}
isRegistered.set(true)
return intent
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ okHttp = "4.11.0"
kronosNTP = "0.0.1-alpha11"

# Android
androidToolsPlugin = "8.0.2"
androidToolsPlugin = "8.1.1"
androidXAnnotations = "1.1.0"
androidXAppCompat = "1.3.0"
androidXCore = "1.3.1"
Expand Down

0 comments on commit 55a81d6

Please sign in to comment.