Messaging: Prevent broadcast spoofing

Change-Id: Ib0df346233cd4fcbf242aef580f72414bf1e359b
This commit is contained in:
Michael W
2024-12-13 16:06:35 +01:00
parent 101b31e873
commit 37d6d70835
2 changed files with 11 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 The Android Open Source Project
* Copyright (C) 2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +20,7 @@ package com.android.messaging.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.provider.Telephony.Sms;
/**
* Class that receives incoming SMS messages on KLP+ Devices.
@@ -26,6 +28,8 @@ import android.content.Intent;
public final class SmsDeliverReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, final Intent intent) {
SmsReceiver.deliverSmsIntent(context, intent);
if (Sms.Intents.SMS_DELIVER_ACTION.equals(intent.getAction())) {
SmsReceiver.deliverSmsIntent(context, intent);
}
}
}