1. 在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. 在 SmsCbHeader.java(alps/frameworks/opt/telephony/src/java/com/android/internal/telephony/gsm)中添加个判断:
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. 在GsmCellBroadcastHandler.java 中对handleGsmBroadcastSms() 方法做如下修改:
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