Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ab11042 authored by David Ferguson's avatar David Ferguson Committed by Ricardo Cerqueira
Browse files

clean up overridden unsolicited response

Problems fixed:
  - Cases 1031-1035 are now fully handled by RIL.java base class; override
    them here only for devices using GB radio libraries
  - Comments for cases 1031-1035 did not match the codes in ril.h (in ICS)
  - Case 1034 is RIL_CONNECTED - overriding it caused this message to be
    obscured and mRilVersion was never set and connection notification was
    not sent out (root cause for hanging SETUP_DATA_CALL on Skyrocket and Note)
  - Add case 1038 (DATA_NETWORK_STATE_CHANGED)

Change-Id: Ie0197446193111394833f40bfedf8e1516deb7db
parent 8f2303e5
Loading
Loading
Loading
Loading
+18 −10
Original line number Diff line number Diff line
@@ -532,15 +532,25 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
        int dataPosition = p.dataPosition(); // save off position within the Parcel
        int response = p.readInt();

        /* Assume devices needing the "datacall" GB-compatibility flag are
         * running GB RILs, so skip 1031-1034 for those */
        if (needsOldRilFeature("datacall")) {
            switch(response) {
                 case 1031:
                 case 1032:
                 case 1033:
                 case 1034:
                     ret = responseVoid(p);
                     return;
            }
        }

        switch(response) {
            case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: ret =  responseVoid(p);
            case 1031: ret = responseVoid(p); break; // RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
            case 1032: ret = responseInts(p); break; // RIL_UNSOL_TETHERED_MODE_STATE_CHANGED
            case 1033: ret = responseVoid(p); break; // RIL_UNSOL_RESPONSE_DATA_NETWORK_STATE_CHANGED
            case 1034: ret = responseVoid(p); break; // RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
            case 1035: ret = responseVoid(p); break; // RIL_UNSOL_CDMA_PRL_CHANGED
            case 1035: ret = responseVoid(p); break; // RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
            case 1036: ret = responseVoid(p); break; // RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
            case 1037: ret = responseVoid(p); break; // RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
            case 1038: ret = responseVoid(p); break; // RIL_UNSOL_DATA_NETWORK_STATE_CHANGED

            default:
                // Rewind the Parcel
@@ -556,10 +566,6 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                int state = p.readInt();
                setRadioStateFromRILInt(state);
            break;
            case 1031:
            case 1032:
            case 1033:
            case 1034:
            case 1035:
            case 1036:
                break;
@@ -571,6 +577,8 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                                        new AsyncResult (null, null, null));
                }
                break;
            case 1038:
                break;
        }
    }