Make the NitzStateMachine behavior more regular
Much of the NitzStateMachine behavior was adopted from an understanding of how ServiceStateTracker behaved, including behavior that didn't make complete sense. This commit improves guarantees about when fields are set to provide clearer post-conditions from the various "handle" methods. Specifically, after this commit: mLatestNitzSignal - always holds the most recently received NITZ signal. mSavedTimeZoneId - always holds the last time zone detected. mNitzTimeZoneDetectionSuccessful - is always set when NITZ has been used to set the time zone. Before this commit the statements above were not always true, depending on the order in which events were received. Test: atest FrameworksTelephonyTests:com.android.internal.telephony.NitzStateMachineTest Test: atest FrameworksTelephonyTests:com.android.internal.telephony.ServiceStateTrackerTest Bug: 78217059 Change-Id: Ib935431cf1a0871801635894451a68a3f1702272
Loading
Please register or sign in to comment