From 30353a582c9087494391fff720e22e04a06d3532 Mon Sep 17 00:00:00 2001 From: "Loren M. Lang" Date: Sun, 4 Aug 2024 00:15:56 -0700 Subject: [PATCH] Fix PendingIntent for Android 12 Starting with API level 31, a flag for mutable or immutable intent is now required or an exception will be generated crashing the app. This fixes a crash seen in PR ge0rg/aprsdroid#382 --- src/backend/DigiRig.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/DigiRig.scala b/src/backend/DigiRig.scala index a848378e..0afc4614 100644 --- a/src/backend/DigiRig.scala +++ b/src/backend/DigiRig.scala @@ -57,7 +57,7 @@ class DigiRig(service : AprsService, prefs : PrefsWrapper) extends AfskUploader( 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_MUTABLE) // Audio stuff var audioPlaying = false