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

Commit d6bae355 authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Change to match unregister calls with register ones.

Test: Basic telephony sanity
Bug: 64131518
Change-Id: I7f333fdc3a0dc692aa88f6ae92b2d21d38bab068
parent 1076d8a7
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -406,16 +406,16 @@ public class IccCardProxy extends Handler implements IccCard {
    private void unregisterUiccCardEvents() {
        if (mUiccSlot != null) mUiccSlot.unregisterForAbsent(this);
        if (mUiccCard != null) mUiccCard.unregisterForCarrierPrivilegeRulesLoaded(this);
        if (mUiccApplication != null) mUiccApplication.unregisterForReady(this);
        if (mUiccApplication != null) mUiccApplication.unregisterForLocked(this);
        if (mUiccApplication != null) mUiccApplication.unregisterForNetworkLocked(this);
        if (mIccRecords != null) mIccRecords.unregisterForImsiReady(this);
        if (mIccRecords != null) mIccRecords.unregisterForRecordsLoaded(this);
        if (mIccRecords != null) mIccRecords.unregisterForRecordsEvents(this);
        if (mUiccApplication != null) {
            mUiccApplication.unregisterForReady(this);
            mUiccApplication.unregisterForNetworkLocked(this);
        }
        if (mIccRecords != null) {
            mIccRecords.unregisterForImsiReady(this);
            mIccRecords.unregisterForRecordsLoaded(this);
            mIccRecords.unregisterForLockedRecordsLoaded(this);
            mIccRecords.unregisterForRecordsEvents(this);
        }

    private void updateStateProperty() {
        mTelephonyManager.setSimStateForPhone(mPhoneId, getState().toString());
    }

    private void broadcastIccStateChangedIntent(String value, String reason) {
+9 −5
Original line number Diff line number Diff line
@@ -396,11 +396,15 @@ public class UiccProfile extends Handler implements IccCard {

    private void unregisterUiccCardEvents() {
        if (mUiccCard != null) mUiccCard.unregisterForCarrierPrivilegeRulesLoaded(this);
        if (mUiccApplication != null) mUiccApplication.unregisterForReady(this);
        if (mUiccApplication != null) mUiccApplication.unregisterForLocked(this);
        if (mUiccApplication != null) mUiccApplication.unregisterForNetworkLocked(this);
        if (mIccRecords != null) mIccRecords.unregisterForRecordsLoaded(this);
        if (mIccRecords != null) mIccRecords.unregisterForRecordsEvents(this);
        if (mUiccApplication != null) {
            mUiccApplication.unregisterForReady(this);
            mUiccApplication.unregisterForNetworkLocked(this);
        }
        if (mIccRecords != null) {
            mIccRecords.unregisterForRecordsLoaded(this);
            mIccRecords.unregisterForLockedRecordsLoaded(this);
            mIccRecords.unregisterForRecordsEvents(this);
        }
    }

    private void broadcastIccStateChangedIntent(String value, String reason) {