Migrate DATA_ACTIVITY_TIMEOUT_MOBILE/WIFI from Settings.Secure to Settings.Global
Bug: 7189605 Change-Id: Id54b8d490d7849bf071c3fbfd8f7358ed873a4e8
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user