fix: make notification intents explicitly targeted (#570)
Make notification destinations explicit in an analyzer-visible form while retaining immutable PendingIntent flags, resolving the high-severity CodeQL finding.
This commit is contained in:
1 parent
3b746ad354
commit
87a69e748f
1 file changed
+2
-2
+2
-2
@@ -358,7 +358,7 @@ class WallpaperChangeService : Service() {
|
|||||||
val pendingIntent = PendingIntent.getActivity(
|
val pendingIntent = PendingIntent.getActivity(
|
||||||
this,
|
this,
|
||||||
0,
|
0,
|
||||||
Intent(this, MainActivity::class.java),
|
Intent().setClassName(packageName, MainActivity::class.java.name),
|
||||||
PendingIntent.FLAG_IMMUTABLE
|
PendingIntent.FLAG_IMMUTABLE
|
||||||
)
|
)
|
||||||
return NotificationCompat.Builder(this, Constants.NOTIFICATION_CHANNEL_ID)
|
return NotificationCompat.Builder(this, Constants.NOTIFICATION_CHANNEL_ID)
|
||||||
@@ -374,7 +374,7 @@ class WallpaperChangeService : Service() {
|
|||||||
val pendingIntent = PendingIntent.getActivity(
|
val pendingIntent = PendingIntent.getActivity(
|
||||||
this,
|
this,
|
||||||
0,
|
0,
|
||||||
Intent(this, MainActivity::class.java),
|
Intent().setClassName(packageName, MainActivity::class.java.name),
|
||||||
PendingIntent.FLAG_IMMUTABLE
|
PendingIntent.FLAG_IMMUTABLE
|
||||||
)
|
)
|
||||||
val notification = NotificationCompat.Builder(this, Constants.NOTIFICATION_CHANNEL_ID)
|
val notification = NotificationCompat.Builder(this, Constants.NOTIFICATION_CHANNEL_ID)
|
||||||
|
|||||||
Reference in new issue
Block a user