Skip to content

Conversation

@maxschwinghammer
Copy link
Collaborator

Potential fix for https://github.com/FreshKeeper/AndroidApp/security/code-scanning/12

To fix the flagged problem, ensure that the Intent used to create the PendingIntent for the broadcast is explicitly targeted to a specific component, avoiding any potential ambiguity. While Intent(context, Receiver::class.java) generally creates an explicit intent, some static analysis tools may require setClass() to be used or, at minimum, for the code to be clear and unambiguous. The fix is to call setClass() on the intent, explicitly specifying the destination class. This should be implemented in scheduleDailyReminder() in DailyReminderReceiver.kt. No new imports are required since all necessary symbols are already imported.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…Intents

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants