View Single Post
  #598 (permalink)  
Old 12-07-2011, 12:57 PM
muziling's Avatar
muziling
PPCGeeks Regular
Offline
 
Join Date: Nov 2010
Posts: 175
Reputation: 55
muziling is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] - NAND OMGB (1.2.3)

Quote:
Originally Posted by [ACL] View Post
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");
    }

Last edited by muziling; 12-07-2011 at 12:59 PM.
Reply With Quote
This post has been thanked 1 times.