Remove unused address and subject from message filter in SmsReceiver

This commit is contained in:
Ensar Sarajčić 2023-07-10 17:00:32 +02:00
parent 674a467694
commit daea2d2e5d
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class SmsReceiver : BroadcastReceiver() {
private fun handleMessage(
context: Context, address: String, subject: String, body: String, date: Long, read: Int, threadId: Long, type: Int, subscriptionId: Int, status: Int
) {
if (isMessageFilteredOut(context, address, subject, body)) {
if (isMessageFilteredOut(context, body)) {
return
}
@ -111,7 +111,7 @@ class SmsReceiver : BroadcastReceiver() {
}
}
private fun isMessageFilteredOut(context: Context, address: String, subject: String, body: String): Boolean {
private fun isMessageFilteredOut(context: Context, body: String): Boolean {
for (blockedKeyword in context.config.blockedKeywords) {
if (body.contains(blockedKeyword, ignoreCase = true)) {
return true