Customers found that the 4370~4382 cell broadcast channel was opened, want to block these channels of cell broadcast messages, you can refer to the following settings:
1. Add a macro in Smscbconstants.java (ALPS/FRAMEWORKS/OPT/TELEPHONY/SRC/JAVA/COM/ANDROID/INTERNAL/TELEPHONY/GSM):
public static final int message_id_cbdd_identifier_min = 0x1112; Add by MTK for 4370
public static final int message_id_cbdd_identifier_max = 0x111e; Add by MTK for 4382
2. In Smscbheader.java (alps/frameworks/opt/telephony/src/java/com/android/internal/telephony/gsm), add a judgment:
Public Smscbheader (byte[] PDU, Boolean isetwsprimary) throws illegalargumentexception{
......
Mmessageidentifier = ((pdu[2] & 0xff) <<8) | (Pdu[3] & 0xff);
Add by MTK for 4370 ~ 4382
if (mmessageidentifier >= smscbconstants.message_id_cbdd_identifier_min && mmessageidentifier <= Smscbconstants.message_id_cbdd_identifier_max)
{
return;
}
Add by MTK for 4370 ~ 4382
}
3. Make the following modifications to the Handlegsmbroadcastsms () method in Gsmcellbroadcasthandler.java:
Private Smscbmessage handlegsmbroadcastsms (AsyncResult ar) {
......
Smscbheader Header = new Smscbheader (RECEIVEDPDU, false);
Add by MTK for 4370 ~ 4382
if (Header.getservicecategory () >= smscbconstants.message_id_cbdd_identifier_min && Header.getservicecategory () <= Smscbconstants.message_id_cbdd_identifier_max)
{
return;
}
Add by MTK for 4370 ~ 4382
......
}
Note: The above practices simply do not receive broadcast messages for these channels, but the 4370~4382 channel is still open. If you need to close these channels, you can refer to step 5th.
4, if is the customer preset channel, please check nvram_ef_cb_default_ch_lid and nvram_ef_cb_ch_info_lid and remove. If the channel is a non-customer preset, it is pre-provisioned in the SIM card. You can request to open the macro __cb_channel_only_stored_in_nvram__, so that when the phone starts, do not read the SIM card saved channels. In this way, these channels will not be opened.
There is currently no at command to support the individual shutdown of certain broadcast channels.
How Android Masks cell broadcast messages that receive from certain channels