Quote:
Originally Posted by [ACL]
thanks for taking the initiative here muz. .. now lets make you famous and make a patch. You know how to ? or at least what you want to change ? =D>
|
The code I modified, and I am not sure which number of ro.telephony.default_network is for CDMA service, which for GSM/WCDMA
Code:
#if 0
fd=open("/sys/class/htc_hw/radio", O_RDONLY);
read(fd, buffer, 32);
close(fd);//muziling
if(strncmp(buffer, "GSM",3)==0) {
phone_has = MODE_GSM;
phone_is = MODE_GSM;
LOGI("RIL_Init found GSM hardware");
} else {
phone_has = MODE_CDMA;
phone_is = MODE_CDMA;
LOGI("RIL_Init found CDMA hardware");
}
#endif
memset(buffer, 0, sizeof(buffer));
property_get("ro.telephony.default_network", buffer, "4");
if(strcmp(buffer, "4")==0) {
phone_has = MODE_CDMA;
phone_is = MODE_CDMA;
LOGI("RIL_Init found CDMA hardware");
} else {
phone_has = MODE_GSM;
phone_is = MODE_GSM;
LOGI("RIL_Init found GSM hardware");
}