Skip to content

Commit d308e42

Browse files
penguin359bxlentpartyon
authored andcommitted
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 #382
1 parent 29abb67 commit d308e42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/DigiRig.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class DigiRig(service : AprsService, prefs : PrefsWrapper) extends AfskUploader(
5757
var alreadyRunning = false
5858

5959
val intent = new Intent(USB_PERM_ACTION)
60-
val pendingIntent = PendingIntent.getBroadcast(service, 0, intent, 0)
60+
val pendingIntent = PendingIntent.getBroadcast(service, 0, intent, PendingIntent.FLAG_MUTABLE)
6161

6262
// Audio stuff
6363
var audioPlaying = false

0 commit comments

Comments
 (0)