From f2102f7a1a26d399cc60c516ed7d90ef660de055 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Tue, 3 May 2011 19:02:44 -0700 Subject: Add auto-restore timeout for secondary networks. Settable per network so you can have not timeout for some and some for others. If you set the old NETWORK_RESTORE_DELAY_PROP_NAME system property (android.telephony.apn-restore) it will override this value. Change-Id: Icca706fdc74245dce679209116660e5dc4b05d23 --- core/java/android/net/NetworkConfig.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'core/java') diff --git a/core/java/android/net/NetworkConfig.java b/core/java/android/net/NetworkConfig.java index 6e774a6..3cc0bc5 100644 --- a/core/java/android/net/NetworkConfig.java +++ b/core/java/android/net/NetworkConfig.java @@ -50,6 +50,13 @@ public class NetworkConfig { public boolean dependencyMet; /** + * indicates the default restoral timer in seconds + * if the network is used as a special network feature + * -1 indicates no restoration of default + */ + public int restoreTime; + + /** * input string from config.xml resource. Uses the form: * [Connection name],[ConnectivityManager connection type], * [associated radio-type],[priority],[dependencyMet] @@ -60,7 +67,8 @@ public class NetworkConfig { type = Integer.parseInt(fragments[1]); radio = Integer.parseInt(fragments[2]); priority = Integer.parseInt(fragments[3]); - dependencyMet = Boolean.parseBoolean(fragments[4]); + restoreTime = Integer.parseInt(fragments[4]); + dependencyMet = Boolean.parseBoolean(fragments[5]); } /** -- cgit v1.1