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

Commit 6b1cdff0 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Gerrit Code Review
Browse files

Merge "Fix issue of CS restriction notification incorrectly disappearing"

parents c47d77c1 49e0dd79
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -83,6 +83,10 @@ public class RestrictedState {
        return mCsNormalRestricted && mCsEmergencyRestricted;
    }

    public boolean isAnyCsRestricted() {
        return mCsNormalRestricted || mCsEmergencyRestricted;
    }

    @Override
    public boolean equals (Object o) {
        RestrictedState s;
+3 −3
Original line number Diff line number Diff line
@@ -3668,7 +3668,7 @@ public class ServiceStateTracker extends Handler {
             * and we only need to notify when state is changed.
             */
            if (mRestrictedState.isCsRestricted()) {
                if (!newRs.isCsRestricted()) {
                if (!newRs.isAnyCsRestricted()) {
                    // remove all restriction
                    setNotification(CS_DISABLED);
                } else if (!newRs.isCsNormalRestricted()) {
@@ -3680,7 +3680,7 @@ public class ServiceStateTracker extends Handler {
                }
            } else if (mRestrictedState.isCsEmergencyRestricted() &&
                    !mRestrictedState.isCsNormalRestricted()) {
                if (!newRs.isCsRestricted()) {
                if (!newRs.isAnyCsRestricted()) {
                    // remove all restriction
                    setNotification(CS_DISABLED);
                } else if (newRs.isCsRestricted()) {
@@ -3692,7 +3692,7 @@ public class ServiceStateTracker extends Handler {
                }
            } else if (!mRestrictedState.isCsEmergencyRestricted() &&
                    mRestrictedState.isCsNormalRestricted()) {
                if (!newRs.isCsRestricted()) {
                if (!newRs.isAnyCsRestricted()) {
                    // remove all restriction
                    setNotification(CS_DISABLED);
                } else if (newRs.isCsRestricted()) {