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

Commit 17b8a5e6 authored by chen xu's avatar chen xu
Browse files

refactor resetNv API to resetRadioModemConfig and rebootRadioModem

Bug: 116476729
Test: telephony unit test and Manual test
Change-Id: Ife49bcd0824729420f23ea738705ea29800fda7a
Merged-in: Ife49bcd0824729420f23ea738705ea29800fda7a
parent bb841b97
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -2149,15 +2149,24 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    }

    /**
     * Perform the specified type of NV config reset. The radio will be taken offline
     * and the device must be rebooted after erasing the NV. Used for device
     * Perform the radio modem reboot. The radio will be taken offline. Used for device
     * configuration by some CDMA operators.
     * TODO: reuse nvResetConfig for now, should move to separate HAL API.
     *
     * @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset
     * @param response Callback message.
     */
    public void nvResetConfig(int resetType, Message response) {
        mCi.nvResetConfig(resetType, response);
    public void rebootModem(Message response) {
        mCi.nvResetConfig(1 /* 1: reload NV reset, trigger a modem reboot */, response);
    }

    /**
     * Perform the modem configuration reset. Used for device configuration by some CDMA operators.
     * TODO: reuse nvResetConfig for now, should move to separate HAL API.
     *
     * @param response Callback message.
     */
    public void resetModemConfig(Message response) {
        mCi.nvResetConfig(3 /* factory NV reset */, response);
    }

    public void notifyDataActivity() {