Merge "Move data stall definitions out from Setting" into qt-dev

am: 6839f419de

Change-Id: I0a2a1e5d3de14ea86556ca471e26064df3481412
This commit is contained in:
Chiachang Wang
2019-04-09 05:30:34 -07:00
committed by android-build-merger
8 changed files with 155 additions and 103 deletions

View File

@@ -6062,11 +6062,6 @@ package android.provider {
field public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https"; field public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https";
field public static final String CARRIER_APP_NAMES = "carrier_app_names"; field public static final String CARRIER_APP_NAMES = "carrier_app_names";
field public static final String CARRIER_APP_WHITELIST = "carrier_app_whitelist"; field public static final String CARRIER_APP_WHITELIST = "carrier_app_whitelist";
field public static final String DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD = "data_stall_consecutive_dns_timeout_threshold";
field public static final String DATA_STALL_EVALUATION_TYPE = "data_stall_evaluation_type";
field public static final int DATA_STALL_EVALUATION_TYPE_DNS = 1; // 0x1
field public static final String DATA_STALL_MIN_EVALUATE_INTERVAL = "data_stall_min_evaluate_interval";
field public static final String DATA_STALL_VALID_DNS_TIME_THRESHOLD = "data_stall_valid_dns_time_threshold";
field public static final String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus"; field public static final String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus";
field public static final String DEVICE_DEMO_MODE = "device_demo_mode"; field public static final String DEVICE_DEMO_MODE = "device_demo_mode";
field public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED = "device_provisioning_mobile_data"; field public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED = "device_provisioning_mobile_data";

View File

@@ -2160,11 +2160,6 @@ package android.provider {
field public static final String CAPTIVE_PORTAL_OTHER_FALLBACK_URLS = "captive_portal_other_fallback_urls"; field public static final String CAPTIVE_PORTAL_OTHER_FALLBACK_URLS = "captive_portal_other_fallback_urls";
field public static final String CAPTIVE_PORTAL_USER_AGENT = "captive_portal_user_agent"; field public static final String CAPTIVE_PORTAL_USER_AGENT = "captive_portal_user_agent";
field public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https"; field public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https";
field public static final String DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD = "data_stall_consecutive_dns_timeout_threshold";
field public static final String DATA_STALL_EVALUATION_TYPE = "data_stall_evaluation_type";
field public static final int DATA_STALL_EVALUATION_TYPE_DNS = 1; // 0x1
field public static final String DATA_STALL_MIN_EVALUATE_INTERVAL = "data_stall_min_evaluate_interval";
field public static final String DATA_STALL_VALID_DNS_TIME_THRESHOLD = "data_stall_valid_dns_time_threshold";
field public static final String DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD = "dynamic_power_savings_disable_threshold"; field public static final String DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD = "dynamic_power_savings_disable_threshold";
field public static final String DYNAMIC_POWER_SAVINGS_ENABLED = "dynamic_power_savings_enabled"; field public static final String DYNAMIC_POWER_SAVINGS_ENABLED = "dynamic_power_savings_enabled";
field public static final String HIDDEN_API_BLACKLIST_EXEMPTIONS = "hidden_api_blacklist_exemptions"; field public static final String HIDDEN_API_BLACKLIST_EXEMPTIONS = "hidden_api_blacklist_exemptions";

View File

@@ -11198,62 +11198,6 @@ public final class Settings {
@TestApi @TestApi
public static final String CAPTIVE_PORTAL_USER_AGENT = "captive_portal_user_agent"; public static final String CAPTIVE_PORTAL_USER_AGENT = "captive_portal_user_agent";
/**
* The threshold value for the number of consecutive dns timeout events received to be a
* signal of data stall. The number of consecutive timeouts needs to be {@code >=} this
* threshold to be considered a data stall. Set the value to {@code <= 0} to disable. Note
* that the value should be {@code > 0} if the DNS data stall detection is enabled.
*
* @hide
*/
@SystemApi
@TestApi
public static final String DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD =
"data_stall_consecutive_dns_timeout_threshold";
/**
* The minimal time interval in milliseconds for data stall reevaluation.
*
* @hide
*/
@SystemApi
@TestApi
public static final String DATA_STALL_MIN_EVALUATE_INTERVAL =
"data_stall_min_evaluate_interval";
/**
* DNS timeouts older than this timeout (in milliseconds) are not considered for detecting
* a data stall.
*
* @hide
*/
@SystemApi
@TestApi
public static final String DATA_STALL_VALID_DNS_TIME_THRESHOLD =
"data_stall_valid_dns_time_threshold";
/**
* Which data stall detection signal to use. This is a bitmask constructed by bitwise-or-ing
* (i.e. {@code |}) the DATA_STALL_EVALUATION_TYPE_* values.
*
* Type: int
* Valid values:
* {@link #DATA_STALL_EVALUATION_TYPE_DNS} : Use dns as a signal.
* @hide
*/
@SystemApi
@TestApi
public static final String DATA_STALL_EVALUATION_TYPE = "data_stall_evaluation_type";
/**
* Use dns timeout counts to detect data stall.
*
* @hide
*/
@SystemApi
@TestApi
public static final int DATA_STALL_EVALUATION_TYPE_DNS = 1;
/** /**
* Whether to try cellular data recovery when a bad network is reported. * Whether to try cellular data recovery when a bad network is reported.
* *

View File

@@ -203,11 +203,7 @@ public class SettingsBackupTest {
Settings.Global.DATA_ROAMING, Settings.Global.DATA_ROAMING,
Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS, Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS,
Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS, Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS,
Settings.Global.DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD,
Settings.Global.DATA_STALL_EVALUATION_TYPE,
Settings.Global.DATA_STALL_MIN_EVALUATE_INTERVAL,
Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK, Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK,
Settings.Global.DATA_STALL_VALID_DNS_TIME_THRESHOLD,
Settings.Global.DEBUG_APP, Settings.Global.DEBUG_APP,
Settings.Global.DEBUG_VIEW_ATTRIBUTES, Settings.Global.DEBUG_VIEW_ATTRIBUTES,
Settings.Global.DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE, Settings.Global.DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE,

View File

@@ -0,0 +1,72 @@
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.net.util;
/**
* Collection of utilities for data stall.
*/
public class DataStallUtils {
/**
* Detect data stall via using dns timeout counts.
*/
public static final int DATA_STALL_EVALUATION_TYPE_DNS = 1;
// Default configuration values for data stall detection.
public static final int DEFAULT_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD = 5;
public static final int DEFAULT_DATA_STALL_MIN_EVALUATE_TIME_MS = 60 * 1000;
public static final int DEFAULT_DATA_STALL_VALID_DNS_TIME_THRESHOLD_MS = 30 * 60 * 1000;
/**
* The threshold value for the number of consecutive dns timeout events received to be a
* signal of data stall. The number of consecutive timeouts needs to be {@code >=} this
* threshold to be considered a data stall. Set the value to {@code <= 0} to disable. Note
* that the value should be {@code > 0} if the DNS data stall detection is enabled.
*
*/
public static final String CONFIG_DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD =
"data_stall_consecutive_dns_timeout_threshold";
/**
* The minimal time interval in milliseconds for data stall reevaluation.
*
*/
public static final String CONFIG_DATA_STALL_MIN_EVALUATE_INTERVAL =
"data_stall_min_evaluate_interval";
/**
* DNS timeouts older than this timeout (in milliseconds) are not considered for detecting
* a data stall.
*
*/
public static final String CONFIG_DATA_STALL_VALID_DNS_TIME_THRESHOLD =
"data_stall_valid_dns_time_threshold";
/**
* Which data stall detection signal to use. This is a bitmask constructed by bitwise-or-ing
* (i.e. {@code |}) the DATA_STALL_EVALUATION_TYPE_* values.
*
* Type: int
* Valid values:
* {@link #DATA_STALL_EVALUATION_TYPE_DNS} : Use dns as a signal.
*/
public static final String CONFIG_DATA_STALL_EVALUATION_TYPE = "data_stall_evaluation_type";
public static final int DEFAULT_DATA_STALL_EVALUATION_TYPES = DATA_STALL_EVALUATION_TYPE_DNS;
// The default number of DNS events kept of the log kept for dns signal evaluation. Each event
// is represented by a {@link com.android.server.connectivity.NetworkMonitor#DnsResult} objects.
// It's also the size of array of {@link com.android.server.connectivity.nano.DnsEvent} kept in
// metrics. Note that increasing the size may cause statsd log buffer bust. Need to check the
// design in statsd when you try to increase the size.
public static final int DEFAULT_DNS_LOG_SIZE = 20;
}

View File

@@ -32,6 +32,9 @@ import java.util.function.Predicate;
* Collection of utilities for the network stack. * Collection of utilities for the network stack.
*/ */
public class NetworkStackUtils { public class NetworkStackUtils {
// TODO: Refer to DeviceConfig definition.
public static final String NAMESPACE_CONNECTIVITY = "connectivity";
static { static {
System.loadLibrary("networkstackutilsjni"); System.loadLibrary("networkstackutilsjni");
} }
@@ -103,6 +106,24 @@ public class NetworkStackUtils {
return value != null ? value : defaultValue; return value != null ? value : defaultValue;
} }
/**
* Look up the value of a property for a particular namespace from {@link DeviceConfig}.
* @param namespace The namespace containing the property to look up.
* @param name The name of the property to look up.
* @param defaultValue The value to return if the property does not exist or has no non-null
* value.
* @return the corresponding value, or defaultValue if none exists.
*/
public static int getDeviceConfigPropertyInt(@NonNull String namespace, @NonNull String name,
int defaultValue) {
String value = getDeviceConfigProperty(namespace, name, null /* defaultValue */);
try {
return (value != null) ? Integer.parseInt(value) : defaultValue;
} catch (NumberFormatException e) {
return defaultValue;
}
}
/** /**
* Attaches a socket filter that accepts DHCP packets to the given socket. * Attaches a socket filter that accepts DHCP packets to the given socket.
*/ */

View File

@@ -33,8 +33,18 @@ import static android.net.metrics.ValidationProbeEvent.DNS_FAILURE;
import static android.net.metrics.ValidationProbeEvent.DNS_SUCCESS; import static android.net.metrics.ValidationProbeEvent.DNS_SUCCESS;
import static android.net.metrics.ValidationProbeEvent.PROBE_FALLBACK; import static android.net.metrics.ValidationProbeEvent.PROBE_FALLBACK;
import static android.net.metrics.ValidationProbeEvent.PROBE_PRIVDNS; import static android.net.metrics.ValidationProbeEvent.PROBE_PRIVDNS;
import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD;
import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_EVALUATION_TYPE;
import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_MIN_EVALUATE_INTERVAL;
import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_VALID_DNS_TIME_THRESHOLD;
import static android.net.util.DataStallUtils.DATA_STALL_EVALUATION_TYPE_DNS;
import static android.net.util.DataStallUtils.DEFAULT_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD;
import static android.net.util.DataStallUtils.DEFAULT_DATA_STALL_EVALUATION_TYPES;
import static android.net.util.DataStallUtils.DEFAULT_DATA_STALL_MIN_EVALUATE_TIME_MS;
import static android.net.util.DataStallUtils.DEFAULT_DATA_STALL_VALID_DNS_TIME_THRESHOLD_MS;
import static android.net.util.DataStallUtils.DEFAULT_DNS_LOG_SIZE;
import static android.net.util.NetworkStackUtils.NAMESPACE_CONNECTIVITY;
import static android.net.util.NetworkStackUtils.isEmpty; import static android.net.util.NetworkStackUtils.isEmpty;
import static android.provider.Settings.Global.DATA_STALL_EVALUATION_TYPE_DNS;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.Nullable; import android.annotation.Nullable;
@@ -62,6 +72,7 @@ import android.net.metrics.NetworkEvent;
import android.net.metrics.ValidationProbeEvent; import android.net.metrics.ValidationProbeEvent;
import android.net.shared.NetworkMonitorUtils; import android.net.shared.NetworkMonitorUtils;
import android.net.shared.PrivateDnsConfig; import android.net.shared.PrivateDnsConfig;
import android.net.util.NetworkStackUtils;
import android.net.util.SharedLog; import android.net.util.SharedLog;
import android.net.util.Stopwatch; import android.net.util.Stopwatch;
import android.net.wifi.WifiInfo; import android.net.wifi.WifiInfo;
@@ -122,18 +133,6 @@ public class NetworkMonitor extends StateMachine {
private static final int SOCKET_TIMEOUT_MS = 10000; private static final int SOCKET_TIMEOUT_MS = 10000;
private static final int PROBE_TIMEOUT_MS = 3000; private static final int PROBE_TIMEOUT_MS = 3000;
// Default configuration values for data stall detection.
private static final int DEFAULT_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD = 5;
private static final int DEFAULT_DATA_STALL_MIN_EVALUATE_TIME_MS = 60 * 1000;
private static final int DEFAULT_DATA_STALL_VALID_DNS_TIME_THRESHOLD_MS = 30 * 60 * 1000;
private static final int DEFAULT_DATA_STALL_EVALUATION_TYPES =
DATA_STALL_EVALUATION_TYPE_DNS;
// Reevaluate it as intending to increase the number. Larger log size may cause statsd
// log buffer bust and have stats log lost.
private static final int DEFAULT_DNS_LOG_SIZE = 20;
enum EvaluationResult { enum EvaluationResult {
VALIDATED(true), VALIDATED(true),
CAPTIVE_PORTAL(false); CAPTIVE_PORTAL(false);
@@ -384,7 +383,7 @@ public class NetworkMonitor extends StateMachine {
mDnsStallDetector = new DnsStallDetector(mConsecutiveDnsTimeoutThreshold); mDnsStallDetector = new DnsStallDetector(mConsecutiveDnsTimeoutThreshold);
mDataStallMinEvaluateTime = getDataStallMinEvaluateTime(); mDataStallMinEvaluateTime = getDataStallMinEvaluateTime();
mDataStallValidDnsTimeThreshold = getDataStallValidDnsTimeThreshold(); mDataStallValidDnsTimeThreshold = getDataStallValidDnsTimeThreshold();
mDataStallEvaluationType = getDataStallEvalutionType(); mDataStallEvaluationType = getDataStallEvaluationType();
// Provide empty LinkProperties and NetworkCapabilities to make sure they are never null, // Provide empty LinkProperties and NetworkCapabilities to make sure they are never null,
// even before notifyNetworkConnected. // even before notifyNetworkConnected.
@@ -1194,25 +1193,26 @@ public class NetworkMonitor extends StateMachine {
} }
private int getConsecutiveDnsTimeoutThreshold() { private int getConsecutiveDnsTimeoutThreshold() {
return mDependencies.getSetting(mContext, return mDependencies.getDeviceConfigPropertyInt(NAMESPACE_CONNECTIVITY,
Settings.Global.DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD, CONFIG_DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD,
DEFAULT_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD); DEFAULT_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD);
} }
private int getDataStallMinEvaluateTime() { private int getDataStallMinEvaluateTime() {
return mDependencies.getSetting(mContext, return mDependencies.getDeviceConfigPropertyInt(NAMESPACE_CONNECTIVITY,
Settings.Global.DATA_STALL_MIN_EVALUATE_INTERVAL, CONFIG_DATA_STALL_MIN_EVALUATE_INTERVAL,
DEFAULT_DATA_STALL_MIN_EVALUATE_TIME_MS); DEFAULT_DATA_STALL_MIN_EVALUATE_TIME_MS);
} }
private int getDataStallValidDnsTimeThreshold() { private int getDataStallValidDnsTimeThreshold() {
return mDependencies.getSetting(mContext, return mDependencies.getDeviceConfigPropertyInt(NAMESPACE_CONNECTIVITY,
Settings.Global.DATA_STALL_VALID_DNS_TIME_THRESHOLD, CONFIG_DATA_STALL_VALID_DNS_TIME_THRESHOLD,
DEFAULT_DATA_STALL_VALID_DNS_TIME_THRESHOLD_MS); DEFAULT_DATA_STALL_VALID_DNS_TIME_THRESHOLD_MS);
} }
private int getDataStallEvalutionType() { private int getDataStallEvaluationType() {
return mDependencies.getSetting(mContext, Settings.Global.DATA_STALL_EVALUATION_TYPE, return mDependencies.getDeviceConfigPropertyInt(NAMESPACE_CONNECTIVITY,
CONFIG_DATA_STALL_EVALUATION_TYPE,
DEFAULT_DATA_STALL_EVALUATION_TYPES); DEFAULT_DATA_STALL_EVALUATION_TYPES);
} }
@@ -1797,6 +1797,33 @@ public class NetworkMonitor extends StateMachine {
return value != null ? value : defaultValue; return value != null ? value : defaultValue;
} }
/**
* Look up the value of a property in DeviceConfig.
* @param namespace The namespace containing the property to look up.
* @param name The name of the property to look up.
* @param defaultValue The value to return if the property does not exist or has no non-null
* value.
* @return the corresponding value, or defaultValue if none exists.
*/
@Nullable
public String getDeviceConfigProperty(@NonNull String namespace, @NonNull String name,
@Nullable String defaultValue) {
return NetworkStackUtils.getDeviceConfigProperty(namespace, name, defaultValue);
}
/**
* Look up the value of a property in DeviceConfig.
* @param namespace The namespace containing the property to look up.
* @param name The name of the property to look up.
* @param defaultValue The value to return if the property does not exist or has no non-null
* value.
* @return the corresponding value, or defaultValue if none exists.
*/
public int getDeviceConfigPropertyInt(@NonNull String namespace, @NonNull String name,
int defaultValue) {
return NetworkStackUtils.getDeviceConfigPropertyInt(namespace, name, defaultValue);
}
public static final Dependencies DEFAULT = new Dependencies(); public static final Dependencies DEFAULT = new Dependencies();
} }

View File

@@ -21,7 +21,11 @@ import static android.net.INetworkMonitor.NETWORK_TEST_RESULT_INVALID;
import static android.net.INetworkMonitor.NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY; import static android.net.INetworkMonitor.NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY;
import static android.net.INetworkMonitor.NETWORK_TEST_RESULT_VALID; import static android.net.INetworkMonitor.NETWORK_TEST_RESULT_VALID;
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET; import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
import static android.provider.Settings.Global.DATA_STALL_EVALUATION_TYPE_DNS; import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD;
import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_EVALUATION_TYPE;
import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_MIN_EVALUATE_INTERVAL;
import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_VALID_DNS_TIME_THRESHOLD;
import static android.net.util.DataStallUtils.DATA_STALL_EVALUATION_TYPE_DNS;
import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.assertFalse;
@@ -115,7 +119,6 @@ public class NetworkMonitorTest {
private @Captor ArgumentCaptor<String> mNetworkTestedRedirectUrlCaptor; private @Captor ArgumentCaptor<String> mNetworkTestedRedirectUrlCaptor;
private static final int TEST_NETID = 4242; private static final int TEST_NETID = 4242;
private static final String TEST_HTTP_URL = "http://www.google.com/gen_204"; private static final String TEST_HTTP_URL = "http://www.google.com/gen_204";
private static final String TEST_HTTPS_URL = "https://www.google.com/gen_204"; private static final String TEST_HTTPS_URL = "https://www.google.com/gen_204";
private static final String TEST_FALLBACK_URL = "http://fallback.google.com/gen_204"; private static final String TEST_FALLBACK_URL = "http://fallback.google.com/gen_204";
@@ -600,24 +603,23 @@ public class NetworkMonitorTest {
} }
private void setDataStallEvaluationType(int type) { private void setDataStallEvaluationType(int type) {
when(mDependencies.getSetting(any(), when(mDependencies.getDeviceConfigPropertyInt(any(),
eq(Settings.Global.DATA_STALL_EVALUATION_TYPE), anyInt())).thenReturn(type); eq(CONFIG_DATA_STALL_EVALUATION_TYPE), anyInt())).thenReturn(type);
} }
private void setMinDataStallEvaluateInterval(int time) { private void setMinDataStallEvaluateInterval(int time) {
when(mDependencies.getSetting(any(), when(mDependencies.getDeviceConfigPropertyInt(any(),
eq(Settings.Global.DATA_STALL_MIN_EVALUATE_INTERVAL), anyInt())).thenReturn(time); eq(CONFIG_DATA_STALL_MIN_EVALUATE_INTERVAL), anyInt())).thenReturn(time);
} }
private void setValidDataStallDnsTimeThreshold(int time) { private void setValidDataStallDnsTimeThreshold(int time) {
when(mDependencies.getSetting(any(), when(mDependencies.getDeviceConfigPropertyInt(any(),
eq(Settings.Global.DATA_STALL_VALID_DNS_TIME_THRESHOLD), anyInt())).thenReturn(time); eq(CONFIG_DATA_STALL_VALID_DNS_TIME_THRESHOLD), anyInt())).thenReturn(time);
} }
private void setConsecutiveDnsTimeoutThreshold(int num) { private void setConsecutiveDnsTimeoutThreshold(int num) {
when(mDependencies.getSetting(any(), when(mDependencies.getDeviceConfigPropertyInt(any(),
eq(Settings.Global.DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD), anyInt())) eq(CONFIG_DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD), anyInt())).thenReturn(num);
.thenReturn(num);
} }
private void setFallbackUrl(String url) { private void setFallbackUrl(String url) {