Make TimeDetectorService more aware of origin
Make TimeDetectorService more aware of a time signal's origin by making the time signal from telephony less generic. When TimeDetectorService was written it was assumed that the TimeSignal could be generic and there would just be a String source identifier to indicate origin. With multiple SIMs / phones on a device it makes sense to keep track of the originating phone of the signal so that the time detector service could implement stickiness if it wanted. This would avoid a device alternating back and forth between two signals and help with debugging. As new signals are added, new "suggestXxxxTime()" methods will be added to TimeDetectorService. That is the point at which the strategy for ranking different sources can be decided. e.g. should NTP always rank higher than NITZ? The main change here is that TimeSignal is renamed to PhoneTimeSuggestion to indicate it's only for use by signals from telephony, sourceId has been removed and it has been given a phoneId instead. Extra free-form metadata (mDebugInfo) has been added to assist with logging / debugging. Bug:140712361 Test: atest android.app.timedetector Test: atest com.android.server.timedetector Change-Id: I5305c34516e5f4e254309193183f00e054801a46
Loading
Please register or sign in to comment