diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-05-03 19:02:44 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2011-05-03 19:10:26 -0700 |
commit | f2102f7a1a26d399cc60c516ed7d90ef660de055 (patch) | |
tree | ef5a798c8adddd8fc300cdfe9766581b97e12b79 /core | |
parent | 7e74c60db5261ea137c8f6672f8573873eb5814e (diff) | |
download | frameworks_base-f2102f7a1a26d399cc60c516ed7d90ef660de055.zip frameworks_base-f2102f7a1a26d399cc60c516ed7d90ef660de055.tar.gz frameworks_base-f2102f7a1a26d399cc60c516ed7d90ef660de055.tar.bz2 |
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
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/net/NetworkConfig.java | 10 | ||||
-rwxr-xr-x | core/res/res/values/config.xml | 19 |
2 files changed, 20 insertions, 9 deletions
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]); } /** diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index d1d8197..dbeb815 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -131,17 +131,20 @@ attributes. This is used by the connectivity manager to decide which networks can coexist based on the hardware --> <!-- An Array of "[Connection name],[ConnectivityManager connection type], - [associated radio-type],[priority],[dependencyMet] --> - <!-- the 5th element indicates boot-time dependency-met value. --> + [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] --> + <!-- the 5th element "resore-time" indicates the number of milliseconds to delay + before automatically restore the default connection. Set -1 if the connection + does not require auto-restore. --> + <!-- the 6th element indicates boot-time dependency-met value. --> <string-array translatable="false" name="networkAttributes"> <item>"wifi,1,1,1,true"</item> <item>"mobile,0,0,0,true"</item> - <item>"mobile_mms,2,0,2,true"</item> - <item>"mobile_supl,3,0,2,true"</item> - <item>"mobile_hipri,5,0,3,true"</item> - <item>"mobile_fota,10,0,2,true"</item> - <item>"mobile_ims,11,0,2,true"</item> - <item>"mobile_cbs,12,0,2,true"</item> + <item>"mobile_mms,2,0,2,60000,true"</item> + <item>"mobile_supl,3,0,2,60000,true"</item> + <item>"mobile_hipri,5,0,3,60000,true"</item> + <item>"mobile_fota,10,0,2,60000,true"</item> + <item>"mobile_ims,11,0,2,60000,true"</item> + <item>"mobile_cbs,12,0,2,60000,true"</item> </string-array> <!-- This string array should be overridden by the device to present a list of radio |