Potential fix for code scanning alert no. 30: Improper verification of intent by broadcast receiver (#1914)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
James Rich 2025-05-22 15:54:09 -05:00 committed by GitHub
parent ffe8d20f7c
commit 4c805666a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,10 @@ import com.geeksville.mesh.android.Logging
class BootCompleteReceiver : BroadcastReceiver(), Logging {
override fun onReceive(mContext: Context, intent: Intent) {
// Verify the intent action
if (Intent.ACTION_BOOT_COMPLETED != intent.action) {
return
}
// start listening for bluetooth messages from our device
MeshService.startServiceLater(mContext)
}