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

Commit caf2d223 authored by SongFerngWang's avatar SongFerngWang
Browse files

upperLayerIndicator_r15 is optional, nr state design changed

Bug: 151270999
Test: build pass.
Change-Id: I2b02d01dfd821ebcbf098236e11cf1d2832677bb
parent cf0b6a48
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -2046,18 +2046,16 @@ public class ServiceStateTracker extends Handler {
            }
        }

        int newNrState = regInfo.getNrState();
        int oldNrState = regInfo.getNrState();
        int newNrState = oldNrState;
        if (hasNrSecondaryServingCell) {
            if (regInfo.getNrState() == NetworkRegistrationInfo.NR_STATE_NOT_RESTRICTED) {
            newNrState = NetworkRegistrationInfo.NR_STATE_CONNECTED;
            }
        } else {
            if (regInfo.getNrState() == NetworkRegistrationInfo.NR_STATE_CONNECTED) {
                newNrState = NetworkRegistrationInfo.NR_STATE_NOT_RESTRICTED;
            }
            regInfo.updateNrState();
            newNrState = regInfo.getNrState();
        }

        boolean hasChanged = newNrState != regInfo.getNrState();
        boolean hasChanged = newNrState != oldNrState;
        regInfo.setNrState(newNrState);
        ss.addNetworkRegistrationInfo(regInfo);
        return hasChanged;