DO NOT MERGE
Fix security vulnerability in pre-O rild code.

Remove wrong code for setup_data_call.
Add check for max address for RIL_DIAL.

Bug: 37896655
Test: Manual.
Change-Id: I05c027140ae828a2653794fcdd94e1b1a130941b
(cherry picked from commit dda24c6557911aa1f4708abbd6b2f20f0e205b9e)

decodeSimStatus (RIL_RadioState radioState) {
 switch (radioState) {
 case RADIO_STATE_SIM_NOT_READY:
 case RADIO_STATE_RUIM_NOT_READY:
 case RADIO_STATE_NV_NOT_READY:
 case RADIO_STATE_NV_READY:
 return -1;
 case RADIO_STATE_SIM_LOCKED_OR_ABSENT:
 case RADIO_STATE_SIM_READY:
 case RADIO_STATE_RUIM_READY:
 case RADIO_STATE_RUIM_LOCKED_OR_ABSENT:
 return radioState;
 default:
           RLOGD("decodeSimStatus: Invoked with incorrect RadioState");
 return -1;
 }
}

decodeSimStatus (RIL_RadioState radioState) {
 switch (radioState) {
 case RADIO_STATE_SIM_NOT_READY:
 case RADIO_STATE_RUIM_NOT_READY:
 case RADIO_STATE_NV_NOT_READY:
 case RADIO_STATE_NV_READY:
 return -1;
 case RADIO_STATE_SIM_LOCKED_OR_ABSENT:
 case RADIO_STATE_SIM_READY:
 case RADIO_STATE_RUIM_READY:
 case RADIO_STATE_RUIM_LOCKED_OR_ABSENT:
 return radioState;
 default:
           RLOGD("decodeSimStatus: Invoked with incorrect RadioState");
 return -1;
 }
}
