Migrate DATA_ACTIVITY_TIMEOUT_MOBILE/WIFI from Settings.Secure to Settings.Global

Bug: 7189605
Change-Id: Id54b8d490d7849bf071c3fbfd8f7358ed873a4e8
This commit is contained in:
Ashish Sharma
2012-09-26 11:33:50 -07:00
parent 32bed2cc47
commit 6c97dcf3c7

View File

@@ -2108,14 +2108,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
final int timeout; final int timeout;
if (ConnectivityManager.isNetworkTypeMobile(type)) { if (ConnectivityManager.isNetworkTypeMobile(type)) {
timeout = Settings.Secure.getInt(mContext.getContentResolver(), timeout = Settings.Global.getInt(mContext.getContentResolver(),
Settings.Secure.DATA_ACTIVITY_TIMEOUT_MOBILE, Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE,
0); 0);
// Canonicalize mobile network type // Canonicalize mobile network type
type = ConnectivityManager.TYPE_MOBILE; type = ConnectivityManager.TYPE_MOBILE;
} else if (ConnectivityManager.TYPE_WIFI == type) { } else if (ConnectivityManager.TYPE_WIFI == type) {
timeout = Settings.Secure.getInt(mContext.getContentResolver(), timeout = Settings.Global.getInt(mContext.getContentResolver(),
Settings.Secure.DATA_ACTIVITY_TIMEOUT_WIFI, Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI,
0); 0);
} else { } else {
// do not track any other networks // do not track any other networks