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

Commit 48cac2f5 authored by Paul Keith's avatar Paul Keith Committed by LuK1337
Browse files

RIL: Allow overriding RadioResponse and RadioIndication

* Create RadioResponse and RadioIndication with helper methods
* Make the constructor for RadioIndication public

Change-Id: I57990fb7a25c6b26f633a0f660c5d355c53bc9bb
parent 67268ff1
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -464,8 +464,8 @@ public class RIL extends BaseCommands implements CommandsInterface {
                Context.CONNECTIVITY_SERVICE);
        mIsMobileNetworkSupported = cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE);

        mRadioResponse = new RadioResponse(this);
        mRadioIndication = new RadioIndication(this);
        mRadioResponse = createRadioResponse(this);
        mRadioIndication = createRadioIndication(this);
        mOemHookResponse = new OemHookResponse(this);
        mOemHookIndication = new OemHookIndication(this);
        mRilHandler = new RilHandler();
@@ -493,6 +493,14 @@ public class RIL extends BaseCommands implements CommandsInterface {
        getOemHookProxy(null);
    }

    protected RadioResponse createRadioResponse(RIL ril) {
        return new RadioResponse(ril);
    }

    protected RadioIndication createRadioIndication(RIL ril) {
        return new RadioIndication(ril);
    }

    @Override
    public void setOnNITZTime(Handler h, int what, Object obj) {
        super.setOnNITZTime(h, what, obj);
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ import java.util.List;
public class RadioIndication extends IRadioIndication.Stub {
    RIL mRil;

    RadioIndication(RIL ril) {
    public RadioIndication(RIL ril) {
        mRil = ril;
    }