Remove NitzStateMachine.getSavedTimeZoneId()
Remove the NitzStateMachine.getSavedTimeZoneId() method. The reasoning is as follows: 1) It is only used from one place. 2) The logic that uses it appears unnecessarily complicated. 3) Preserving the "get me the last "high quality" time zone worked out by NitzStateMachine will be difficult to do once the judgement around quality moves to the system server. 4) It's not clear how critical this one code path is. Before this change, ServiceStateTracker preferred using getSaveTimeZoneId() (which returns the ID of the last "resolved" time zone) over using information from the last NITZ data received via getCachedNitzData(). However, the time zone ID is determined by using the NITZ data. The later call to: mHbpcdUtils.getMcc(sid, utcOffsetHours, (isDst ? 1 : 0), isNitzTimeZone) is basically using information available from the NITZ signal but arrived at indirectly. It doesn't seem too bad to just use the original information provided by the carrier. The code has been simplified to only use getCachedNitzData() and isNitzTimeZone boolean is now always set to true when getMcc() is called and NITZ data was used. Bug: 140712361 Test: treehugger Change-Id: I218c4e441baa78b5ad9876e566b128202f49be35
Loading
Please register or sign in to comment