Merge "Add a setting to support for NITZ retention" am: bff4c1b433 am: 696e4a715c am: a2e45b350e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1876199 Change-Id: I57cacf2fcedddd2ccca9a3048f8b9b95b1c9c778
This commit is contained in:
@@ -11332,22 +11332,38 @@ public final class Settings {
|
||||
"night_display_forced_auto_mode_available";
|
||||
|
||||
/**
|
||||
* If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
|
||||
* to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
|
||||
* exceeded.
|
||||
* @hide
|
||||
*/
|
||||
* If UTC time between two NITZ signals is greater than this value then the second signal
|
||||
* cannot be ignored.
|
||||
*
|
||||
* <p>This value is in milliseconds. It is used for telephony-based time and time zone
|
||||
* detection.
|
||||
* @hide
|
||||
*/
|
||||
@Readable
|
||||
public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
|
||||
|
||||
/**
|
||||
* The length of time in milli-seconds that automatic small adjustments to
|
||||
* SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
|
||||
* @hide
|
||||
*/
|
||||
* If the elapsed realtime between two NITZ signals is greater than this value then the
|
||||
* second signal cannot be ignored.
|
||||
*
|
||||
* <p>This value is in milliseconds. It is used for telephony-based time and time zone
|
||||
* detection.
|
||||
* @hide
|
||||
*/
|
||||
@Readable
|
||||
public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
|
||||
|
||||
/**
|
||||
* If the device connects to a telephony network and was disconnected from a telephony
|
||||
* network for less than this time, a previously received NITZ signal can be restored.
|
||||
*
|
||||
* <p>This value is in milliseconds. It is used for telephony-based time and time zone
|
||||
* detection.
|
||||
* @hide
|
||||
*/
|
||||
public static final String NITZ_NETWORK_DISCONNECT_RETENTION =
|
||||
"nitz_network_disconnect_retention";
|
||||
|
||||
/** Preferred NTP server. {@hide} */
|
||||
@Readable
|
||||
public static final String NTP_SERVER = "ntp_server";
|
||||
|
||||
@@ -672,18 +672,31 @@ message GlobalSettingsProto {
|
||||
optional SettingProto new_contact_aggregator = 79 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
optional SettingProto night_display_forced_auto_mode_available = 80 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
|
||||
message NitzUpdate {
|
||||
message Nitz {
|
||||
option (android.msg_privacy).dest = DEST_EXPLICIT;
|
||||
|
||||
// If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment to
|
||||
// SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
|
||||
// exceeded.
|
||||
optional SettingProto diff = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
// The length of time in milli-seconds that automatic small adjustments to
|
||||
// SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
|
||||
optional SettingProto spacing = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
// If UTC time between two NITZ signals is greater than this value then the second signal
|
||||
// cannot be ignored.
|
||||
//
|
||||
// This value is in milliseconds. It is used for telephony-based time and time zone
|
||||
// detection.
|
||||
optional SettingProto update_diff = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
|
||||
// If the elapsed realtime between two NITZ signals is greater than this value then the
|
||||
// second signal cannot be ignored.
|
||||
//
|
||||
// This value is in milliseconds. It is used for telephony-based time and time zone
|
||||
// detection.
|
||||
optional SettingProto update_spacing = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
|
||||
// If the device connects to a telephony network and was disconnected from a telephony
|
||||
// network for less than this time, a previously received NITZ signal can be restored.
|
||||
//
|
||||
// This value is in milliseconds. It is used for telephony-based time and time zone
|
||||
// detection.
|
||||
optional SettingProto network_disconnect_retention = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
}
|
||||
optional NitzUpdate nitz_update = 81;
|
||||
optional Nitz nitz = 81;
|
||||
|
||||
message Notification {
|
||||
option (android.msg_privacy).dest = DEST_EXPLICIT;
|
||||
|
||||
@@ -1082,14 +1082,17 @@ class SettingsProtoDumpUtil {
|
||||
Settings.Global.NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE,
|
||||
GlobalSettingsProto.NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE);
|
||||
|
||||
final long nitzUpdateToken = p.start(GlobalSettingsProto.NITZ_UPDATE);
|
||||
final long nitzToken = p.start(GlobalSettingsProto.NITZ);
|
||||
dumpSetting(s, p,
|
||||
Settings.Global.NITZ_UPDATE_DIFF,
|
||||
GlobalSettingsProto.NitzUpdate.DIFF);
|
||||
GlobalSettingsProto.Nitz.UPDATE_DIFF);
|
||||
dumpSetting(s, p,
|
||||
Settings.Global.NITZ_UPDATE_SPACING,
|
||||
GlobalSettingsProto.NitzUpdate.SPACING);
|
||||
p.end(nitzUpdateToken);
|
||||
GlobalSettingsProto.Nitz.UPDATE_SPACING);
|
||||
dumpSetting(s, p,
|
||||
Settings.Global.NITZ_NETWORK_DISCONNECT_RETENTION,
|
||||
GlobalSettingsProto.Nitz.NETWORK_DISCONNECT_RETENTION);
|
||||
p.end(nitzToken);
|
||||
|
||||
final long notificationToken = p.start(GlobalSettingsProto.NOTIFICATION);
|
||||
dumpSetting(s, p,
|
||||
|
||||
@@ -387,6 +387,7 @@ public class SettingsBackupTest {
|
||||
Settings.Global.NETWORK_WATCHLIST_ENABLED,
|
||||
Settings.Global.NEW_CONTACT_AGGREGATOR,
|
||||
Settings.Global.NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE,
|
||||
Settings.Global.NITZ_NETWORK_DISCONNECT_RETENTION,
|
||||
Settings.Global.NITZ_UPDATE_DIFF,
|
||||
Settings.Global.NITZ_UPDATE_SPACING,
|
||||
Settings.Global.NOTIFICATION_SNOOZE_OPTIONS,
|
||||
|
||||
Reference in New Issue
Block a user