Skip to content

Commit

Permalink
fix reciever export by using contextcompat
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Jul 7, 2024
1 parent 1f56ae7 commit 5ea514a
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import android.os.storage.StorageManager
import android.os.storage.StorageVolume
import android.util.Log
import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import de.felixnuesse.disky.R
import de.felixnuesse.disky.extensions.getStorageUUID
Expand Down Expand Up @@ -183,11 +184,7 @@ class ScanService: Service(), ScannerCallback {
}

val intentFilter = IntentFilter(ERROR_COPY_INTENT_ACTION)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(clipboardReciever, intentFilter, RECEIVER_EXPORTED)
} else {
registerReceiver(clipboardReciever, intentFilter)
}
ContextCompat.registerReceiver(this, clipboardReciever, intentFilter, ContextCompat.RECEIVER_EXPORTED)

val copyIntent = PendingIntent.getBroadcast(
this,
Expand Down

0 comments on commit 5ea514a

Please sign in to comment.