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

Commit e124fc4a authored by Hunsuk Choi's avatar Hunsuk Choi
Browse files

Update triggerImsDeregistration to specify the reason

Bug: 219242993
Test: build & flash
Change-Id: I02ef99b6c8a869a2b1cb7f47d8602f9373ebc577
Merged-In: I02ef99b6c8a869a2b1cb7f47d8602f9373ebc577
parent 811fa9de
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -94,20 +94,24 @@ public class ImsIndication extends IRadioImsIndication.Stub {
    }

    /**
     * Fired by radio when a graceful IMS deregistration needs to be performed by telephony
     * prior to radio performing network detach. Example scenarios are SIM refresh or user
     * mode preference change which would cause network detach. The radio waits for the
     * IMS deregistration, which will be notified by telephony via
     * Requests IMS stack to perform graceful IMS deregistration before radio performing
     * network detach in the events of SIM remove, refresh or and so on. The radio waits for
     * the IMS deregistration, which will be notified by telephony via
     * {@link IRadioIms#updateImsRegistrationInfo()}, or a certain timeout interval to start
     * the network detach procedure.
     *
     * @param indicationType Type of radio indication
     * @param indicationType Type of radio indication.
     * @param reason the reason why the deregistration is triggered.
     */
    public void triggerImsDeregistration(int indicationType) {
    public void triggerImsDeregistration(int indicationType, int reason) {
        mRil.processIndication(RIL.IMS_SERVICE, indicationType);

        if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_TRIGGER_IMS_DEREGISTRATION);
        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_TRIGGER_IMS_DEREGISTRATION, reason);

        int[] response = new int[1];
        response[0] = reason;

        mRil.mTriggerImsDeregistrationRegistrants.notifyRegistrants();
        mRil.mTriggerImsDeregistrationRegistrants.notifyRegistrants(
                new AsyncResult(null, response, null));
    }
}