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

Commit 49e0dd79 authored by Satoshi, Baba X's avatar Satoshi, Baba X Committed by Toshiya Ikenaga
Browse files

Fix issue of CS restriction notification incorrectly disappearing

CS restriction notification disappears when restriction state changes
from whole restricted state to either Normal/Emergency call restricted
state. This issue is caused by incorrect conditions in if statements.

Bug: 31101137
Change-Id: I985d39a32a7ab293986e4694d5b6cc5160f158a8
parent 51a49303
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()) {