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

Commit 8564af2d authored by Hyosun Kim's avatar Hyosun Kim
Browse files

Register the handler for SIM refresh notification

Bug: 338130520
Test: atest SatelliteEntitlementControllerTest
Test: SIM refresh manual test b/346737925#comment6

Change-Id: Ib3f1a2cbf9946c0f52af4831b1fb5fe37e8121af
parent fb645a6e
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -133,7 +133,6 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -2992,6 +2991,29 @@ public class SatelliteController extends Handler {
        return SystemClock.elapsedRealtime();
    }

    /**
     * Register the handler for SIM Refresh notifications.
     * @param handler Handler for notification message.
     * @param what User-defined message code.
     */
    public void registerIccRefresh(Handler handler, int what) {
        for (Phone phone : PhoneFactory.getPhones()) {
            CommandsInterface ci = phone.mCi;
            ci.registerForIccRefresh(handler, what, null);
        }
    }

    /**
     * Unregister the handler for SIM Refresh notifications.
     * @param handler Handler for notification message.
     */
    public void unRegisterIccRefresh(Handler handler) {
        for (Phone phone : PhoneFactory.getPhones()) {
            CommandsInterface ci = phone.mCi;
            ci.unregisterForIccRefresh(handler);
        }
    }

    /**
     * To use the satellite service, update the EntitlementStatus and the PlmnAllowedList after
     * receiving the satellite configuration from the entitlement server. If satellite