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

Commit 603113fa authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

RIL subclasses: Fix processSolicited for the new API

parent 9d286c83
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -128,11 +128,10 @@ public class HTCCDMAQualcommRIL extends HTCQualcommRIL implements CommandsInterf
    }

    @Override
    protected void
    protected RILRequest
    processSolicited(Parcel p) {
        if (isGSM) {
            super.processSolicited(p);
            return;
            return super.processSolicited(p);
        }
        int serial, error;
        boolean found = false;
@@ -147,7 +146,7 @@ public class HTCCDMAQualcommRIL extends HTCQualcommRIL implements CommandsInterf
        if (rr == null) {
            Rlog.w(RILJ_LOG_TAG, "Unexpected solicited response! sn: "
                    + serial + " error: " + error);
            return;
            return null;
        }

        Object ret = null;
@@ -522,8 +521,7 @@ public class HTCCDMAQualcommRIL extends HTCQualcommRIL implements CommandsInterf
                    AsyncResult.forMessage(rr.mResult, null, tr);
                    rr.mResult.sendToTarget();
                }
                rr.release();
                return;
                return rr;
            }
        }

@@ -561,8 +559,7 @@ public class HTCCDMAQualcommRIL extends HTCQualcommRIL implements CommandsInterf
            }

            rr.onError(error, ret);
            rr.release();
            return;
            return rr;
        }

        if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest)
@@ -573,7 +570,7 @@ public class HTCCDMAQualcommRIL extends HTCQualcommRIL implements CommandsInterf
            rr.mResult.sendToTarget();
        }

        rr.release();
        return rr;
    }

    // CDMA FIXES, this fixes  bogus values in nv/sim on htc cdma family
+5 −7
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
    }

    @Override
    protected void
    protected RILRequest
    processSolicited (Parcel p) {
        int serial, error;
        boolean found = false;
@@ -393,7 +393,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
        if (rr == null) {
            Log.w(LOG_TAG, "Unexpected solicited response! sn: "
                            + serial + " error: " + error);
            return;
            return null;
        }

        Object ret = null;
@@ -536,15 +536,13 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                    AsyncResult.forMessage(rr.mResult, null, tr);
                    rr.mResult.sendToTarget();
                }
                rr.release();
                return;
                return rr;
            }
        }

        if (error != 0) {
            rr.onError(error, ret);
            rr.release();
            return;
            return rr;
        }

        if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest)
@@ -555,7 +553,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
            rr.mResult.sendToTarget();
        }

        rr.release();
        return rr;
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -2328,7 +2328,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
     * @param error is the RIL_Errno sent back
     * @param loggable true means to print all requests in mRequestList
     */
    protected void clearRequestsList(int error, boolean loggable) {
    protected void clearRequestList(int error, boolean loggable) {
        RILRequest rr;
        synchronized (mRequestList) {
            int count = mRequestList.size();
+6 −10
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ public class SamsungCDMAv6RIL extends RIL implements CommandsInterface {
    }

    @Override
    protected void
    protected RILRequest
    processSolicited (Parcel p) {
        int serial, error;

@@ -138,7 +138,7 @@ public class SamsungCDMAv6RIL extends RIL implements CommandsInterface {
        if (rr == null) {
            Rlog.w(RILJ_LOG_TAG, "Unexpected solicited response! sn: "
                    + serial + " error: " + error);
            return;
            return null;
        }

        Object ret = null;
@@ -270,8 +270,7 @@ public class SamsungCDMAv6RIL extends RIL implements CommandsInterface {
                    AsyncResult.forMessage(rr.mResult, null, tr);
                    rr.mResult.sendToTarget();
                }
                rr.release();
                return;
                return rr;
            }
        }

@@ -287,13 +286,11 @@ public class SamsungCDMAv6RIL extends RIL implements CommandsInterface {
                            + requestToString(rr.mRequest)
                            + " exception, Processing Samsung SMS fix ", tr);
                    rr.onError(error, ret);
                    rr.release();
                    return;
                    return rr;
                }
            } else {
                rr.onError(error, ret);
                rr.release();
                return;
                return rr;
            }
        }

@@ -304,8 +301,7 @@ public class SamsungCDMAv6RIL extends RIL implements CommandsInterface {
            AsyncResult.forMessage(rr.mResult, ret, null);
            rr.mResult.sendToTarget();
        }

        rr.release();
        return rr;
    }

    @Override
+6 −9
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
    }

    @Override
    protected void
    protected RILRequest
    processSolicited (Parcel p) {
        int serial, error;

@@ -127,7 +127,7 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
        if (rr == null) {
            Rlog.w(RILJ_LOG_TAG, "Unexpected solicited response! sn: "
                    + serial + " error: " + error);
            return;
            return null;
        }

        Object ret = null;
@@ -265,8 +265,7 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
                    AsyncResult.forMessage(rr.mResult, null, tr);
                    rr.mResult.sendToTarget();
                }
                rr.release();
                return;
                return rr;
            }
        }

@@ -298,13 +297,11 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
                            + requestToString(rr.mRequest)
                            + " exception, Processing Samsung SMS fix ", tr);
                    rr.onError(error, ret);
                    rr.release();
                    return;
                    return rr;
                }
            } else {
                rr.onError(error, ret);
                rr.release();
                return;
                return rr;
            }
        }

@@ -316,7 +313,7 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
            rr.mResult.sendToTarget();
        }

        rr.release();
        return rr;
    }

    @Override
Loading