From e87b2f02761744520c841f536d3f2d7be97fcc91 Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Tue, 2 Jun 2009 15:16:04 -0700 Subject: [PATCH] add Gservices settings for adaptive heartbeat parameters and wifi heartbeat interval. --- core/java/android/provider/Settings.java | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index b4338596ef620..68e4329d988f0 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2566,6 +2566,32 @@ public final class Settings { public static final String GTALK_SERVICE_NOSYNC_HEARTBEAT_INTERVAL_MS = "gtalk_nosync_heartbeat_ping_interval_ms"; + /** + * The maximum heartbeat interval used while on the WIFI network. + */ + public static final String GTALK_SERVICE_WIFI_MAX_HEARTBEAT_INTERVAL_MS = + "gtalk_wifi_max_heartbeat_ping_interval_ms"; + + /** + * The minimum interval for how frequently we send heartbeat pings to the GTalk server. + */ + public static final String GTALK_SERVICE_MIN_HEARTBEAT_INTERVAL_MS = + "gtalk_min_heartbeat_ping_interval_ms"; + + /** + * The scale down factor used by adaptive heartbeat logic (to scale down the heartbeat + * interval) when the previous interval fails to get a response from the server. + */ + public static final String GTALK_SERVICE_ADAPTIVE_HEARTBEAT_SCALER = + "gtalk_adaptive_heartbeat_scaler"; + + /** + * The trigger for adaptively scaling down the heartbeat interval. This is the number of + * consecutive times we failed to get a server response for sending the heartbeat ping. + */ + public static final String GTALK_SERVICE_ADAPTIVE_HEARTBEAT_TRIGGER = + "gtalk_adaptive_heartbeat_trigger"; + /** * How long we wait to receive a heartbeat ping acknowledgement (or another packet) * from the GTalk server, before deeming the connection dead.