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

Commit 6e2fd908 authored by Neil Fuller's avatar Neil Fuller Committed by Gerrit Code Review
Browse files

Merge "Remove unnecessary condition branch"

parents f361d9db e366e306
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.internal.util.IndentingPrintWriter;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.Objects;

/**
 * {@hide}
@@ -144,8 +145,10 @@ public final class NitzStateMachineImpl implements NitzStateMachine {
    }

    private void updateTimeZoneFromCountryAndNitz() {
        // This method must only be called after mLatestNitzSignal has been set to a non-null
        // value.
        TimestampedValue<NitzData> nitzSignal = Objects.requireNonNull(mLatestNitzSignal);
        String isoCountryCode = mDeviceState.getNetworkCountryIsoForPhone();
        TimestampedValue<NitzData> nitzSignal = mLatestNitzSignal;

        // TimeZone.getDefault() returns a default zone (GMT) even when time zone have never
        // been set which makes it difficult to tell if it's what the user / time zone detection
@@ -185,13 +188,6 @@ public final class NitzStateMachineImpl implements NitzStateMachine {
                mTimeZoneLog.log(logMsg);

                zoneId = lookupResult != null ? lookupResult.getTimeZone().getID() : null;
            } else if (mLatestNitzSignal == null) {
                if (DBG) {
                    Rlog.d(LOG_TAG,
                            "updateTimeZoneFromCountryAndNitz: No cached NITZ data available,"
                                    + " not setting zone");
                }
                zoneId = null;
            } else if (isNitzSignalOffsetInfoBogus(nitzSignal, isoCountryCode)) {
                String logMsg = "updateTimeZoneFromCountryAndNitz: Received NITZ looks bogus, "
                        + " isoCountryCode=" + isoCountryCode