Android 13: pending intents in backend code

master
Georg Lukas 2023-10-08 17:45:44 +02:00
rodzic 70462b73d7
commit 06fc910b9d
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -49,7 +49,7 @@ class UsbTnc(service : AprsService, prefs : PrefsWrapper) extends AprsBackend(pr
var alreadyRunning = false
val intent = new Intent(USB_PERM_ACTION)
val pendingIntent = PendingIntent.getBroadcast(service, 0, intent, 0)
val pendingIntent = PendingIntent.getBroadcast(service, 0, intent, PendingIntent.FLAG_IMMUTABLE)
val receiver = new BroadcastReceiver() {
override def onReceive(ctx : Context, i : Intent) {

Wyświetl plik

@ -16,7 +16,7 @@ class FixedPosition(service : AprsService, prefs : PrefsWrapper) extends Locatio
val intent = new Intent(ALARM_ACTION)
val pendingIntent = PendingIntent.getBroadcast(service, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT)
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)
// get called on alarm
val receiver = new BroadcastReceiver() {