[G2 and Desire Z Android Development] BRad Barnett:
Ok.

I looked at ril.h in Google's GIT.

http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h

I see things like this:

[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2075"]2075[/URL] /**
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2076"]2076[/URL] * RIL_REQUEST_SCREEN_STATE
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2077"]2077[/URL] *
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2078"]2078[/URL] * Indicates the current state of the screen. When the screen is off, the
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2079"]2079[/URL] * RIL should notify the baseband to suppress certain notifications (eg,
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2080"]2080[/URL] * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2081"]2081[/URL] * in an effort to conserve power. These notifications should resume when the
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2082"]2082[/URL] * screen is on.
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2083"]2083[/URL] *
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2084"]2084[/URL] * "data" is int *
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2085"]2085[/URL] * ((int *)data)[0] is == 1 for "Screen On"
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2086"]2086[/URL] * ((int *)data)[0] is == 0 for "Screen Off"
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2087"]2087[/URL] *
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2088"]2088[/URL] * "response" is NULL
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2089"]2089[/URL] *
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2090"]2090[/URL] * Valid errors:
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2091"]2091[/URL] * SUCCESS
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2092"]2092[/URL] * GENERIC_FAILURE
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2093"]2093[/URL] */
[URL="http://android.git.kernel.org/?p=platform/hardware/ril.git;a=blob;f=include/telephony/ril.h#l2094"]2094[/URL] #define RIL_REQUEST_SCREEN_STATE 61

We don't really have easy access to what's in htc_ril.so, as it's a closed source animal. However, from the above, it looks like the stock rom from Google (and therefore, CM) uses some notification of screen on/off to reduce the radio usage.

This could *really* explain why people are getting rough battery usage with some of these radios. That is, if the SENSE UI radios don't use the same mechanism to inform the radio that the screen is off, and therefore -- the radio for the sense UI never finds out the screen is off, then many of the above functions might not occur.

Hence, greater battery usage.

Note, I haven't investigated this very throughly. However, it could be that the sense UI might need to do things differently, because of all that phone home business. That remote control stuff they have (not sure of the name now).

If the phone went to sleep, perhaps the remote control stuff wouldn't wake the phone, with the wrong radio? Further, it may be that the radios from Sense UIs are listening for some sort of wake mechanism.

There *might* even be a DOS possible against the device, if the radio supports some sort of wake, but the libs don't. (that is, sense UI radio, non-sense UI RIL libs + daemon).