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

Commit cc38c1a6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Change to match unregister calls with register ones."

parents 75f994c7 d6bae355
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) {