Reduce duplication of time zone detection logic
Over the a series of prior commits the time zone detection behavior when receiving ... (a) an NITZ signal then a country code and (b) a country code and then an NITZ signal ... has been nudged closer together. The two paths are now effectively identical. Now it is possible to deduplicate the two paths. This change merges parts of handleNetworkCountryCodeSet() with handleTimeZoneFromNitz() into a new private updateTimeZoneFromCountryAndNitz() method that shares common NITZ + country code time zone detection logic. The logging has generally been tidied as part of this change. More tests have been added to cover the cases when the device is on a test network. Bug: 78217059 Test: atest FrameworksTelephonyTests:com.android.internal.telephony.NitzStateMachineTest Change-Id: If485f441dd766f2140ce248b793b3a8770f00404
Loading
Please register or sign in to comment