frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
public static boolean isEmergencyNumber(String number) {
//这里判断方法各个平台都有差异,我主要介绍下MTK平台的
//sim卡插入时,会产生ecclist(即默认的紧急号码)的系统属性值,一般mtk平台,在ril_sim.c中进行修改
//Read from SIM1
numbers = SystemProperties.get("ril.ecclist1");
for(String emergencyNum : numbers.split(",")){
if((emergencyNum.equals(number) || (emergencyNum + "+").equals(number){
return true;
}
}
//Read from SIM2
numbers = SystemProperties.get("ril.ecclist2");
for(String emergencyNum : numbers.split(",")){
if((emergencyNum.equals(number) || (emergencyNum + "+").equals(number){
return true;
}
}
//Read from SIM3
...
//Read from SIM4
...
numbers = SystemProperties.get("ro.ril.ecclist");
for(String emergencyNum : numbers.split(",")){
if((emergencyNum.equals(number