Skip to content

Commit

Permalink
msm8960-common: libril: better HTC unsolicited response handling
Browse files Browse the repository at this point in the history
Change-Id: Iff488c9f42ee4d59b5470b4181541746c7a511da
  • Loading branch information
intervigilium committed Nov 9, 2013
1 parent f9d48b9 commit f6b330a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions libril/ril.cpp
Expand Up @@ -3572,16 +3572,21 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data,
*
* don't forget to update indices when changing something!
*/
int htc_base = 38;
#ifdef RIL_NO_CELL_INFO_LIST
/* offset by one, because RIL_UNSOL_CELL_INFO_LIST isn't in the list */
htc_base--;
#endif
switch (unsolResponse) {
case RIL_UNSOL_ENTER_LPM: unsolResponseIndex = 37; break;
case RIL_UNSOL_CDMA_3G_INDICATOR: unsolResponseIndex = 38; break;
case RIL_UNSOL_CDMA_ENHANCE_ROAMING_INDICATOR: unsolResponseIndex = 39; break;
case RIL_UNSOL_CDMA_NETWORK_BASE_PLUSCODE_DIAL: unsolResponseIndex = 40; break;
case RIL_UNSOL_RESPONSE_PHONE_MODE_CHANGE: unsolResponseIndex = 41; break;
case RIL_UNSOL_RESPONSE_VOICE_RADIO_TECH_CHANGED: unsolResponseIndex = 42; break;
case RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED_HTC: unsolResponseIndex = 43; break;
case RIL_UNSOL_ENTER_LPM: unsolResponseIndex = htc_base + 0; break;
case RIL_UNSOL_CDMA_3G_INDICATOR: unsolResponseIndex = htc_base + 1; break;
case RIL_UNSOL_CDMA_ENHANCE_ROAMING_INDICATOR: unsolResponseIndex = htc_base + 2; break;
case RIL_UNSOL_CDMA_NETWORK_BASE_PLUSCODE_DIAL: unsolResponseIndex = htc_base + 3; break;
case RIL_UNSOL_RESPONSE_PHONE_MODE_CHANGE: unsolResponseIndex = htc_base + 4; break;
case RIL_UNSOL_RESPONSE_VOICE_RADIO_TECH_CHANGED: unsolResponseIndex = htc_base + 5; break;
case RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED_HTC: unsolResponseIndex = htc_base + 6; break;
case RIL_UNSOL_RESPONSE_DATA_NETWORK_STATE_CHANGED_M7:
case RIL_UNSOL_RESPONSE_DATA_NETWORK_STATE_CHANGED: unsolResponseIndex = 44; break;
case RIL_UNSOL_RESPONSE_DATA_NETWORK_STATE_CHANGED: unsolResponseIndex = htc_base + 7; break;
case RIL_UNSOL_RESPONSE_PHONE_MODE_CHANGE_M7:
// remap 4802 to 2
RLOGD("m7 supported unsolicited response code %d", unsolResponse);
Expand Down

0 comments on commit f6b330a

Please sign in to comment.