Set immutable flag on notification intent. Closes #56.

This commit is contained in:
Mark Qvist 2024-09-21 20:59:50 +02:00
parent 7e6f95e965
commit 4a12c136a0

View File

@ -116,7 +116,7 @@ class SidebandService():
notification_intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
notification_intent.setAction(Intent.ACTION_MAIN)
notification_intent.addCategory(Intent.CATEGORY_LAUNCHER)
self.notification_intent = PendingIntent.getActivity(self.app_context, 0, notification_intent, 0)
self.notification_intent = PendingIntent.getActivity(self.app_context, 0, notification_intent, PendingIntent.FLAG_IMMUTABLE)
notification.setContentIntent(self.notification_intent)
notification.setAutoCancel(True)