Skip to content

Commit

Permalink
Merge pull request #1 from globekeeper/danpe-patch-1
Browse files Browse the repository at this point in the history
Update MavericksMockPrinter.kt
  • Loading branch information
danpe authored Oct 31, 2023
2 parents 1318087 + d5210a8 commit ebbcd0d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.AsyncTask
import android.os.Build
import android.util.Log
import android.view.View
import androidx.fragment.app.Fragment
Expand Down Expand Up @@ -204,6 +205,11 @@ internal abstract class MavericksPrintStateBroadcastReceiver : BroadcastReceiver
fun register(context: Context) {
check(!isRegistered) { "Already registered" }
isRegistered = true
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(networkInfoReceiver, filter, Context.RECEIVER_NOT_EXPORTED)
} else {
context.registerReceiver(networkInfoReceiver, filter)
}
context.registerReceiver(this, IntentFilter(ACTION_COPY_MAVERICKS_STATE))
}

Expand Down

0 comments on commit ebbcd0d

Please sign in to comment.