diff options
author | Remi NGUYEN VAN <reminv@google.com> | 2020-07-06 03:01:27 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-07-06 03:01:27 +0000 |
commit | bf45240a2ac9dc17240bfff6596aee64e1d70a28 (patch) | |
tree | 1fb9ae79902d27934a5b94334331628d580e02ee /src/android/net/util/NetworkStackUtils.java | |
parent | e1b31f105824614c6a506a99faed954d0d6214d3 (diff) | |
parent | 7b6435fd3b3aac33c6b239040bdeac1573a444a5 (diff) |
Merge "Refine validation metrics" into rvc-dev
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
-rwxr-xr-x | src/android/net/util/NetworkStackUtils.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/android/net/util/NetworkStackUtils.java b/src/android/net/util/NetworkStackUtils.java index 19ca4b5..94de7c3 100755 --- a/src/android/net/util/NetworkStackUtils.java +++ b/src/android/net/util/NetworkStackUtils.java @@ -226,6 +226,15 @@ public class NetworkStackUtils { public static final String DNS_PROBE_PRIVATE_IP_NO_INTERNET_VERSION = "dns_probe_private_ip_no_internet"; + /** + * Experiment flag to enable validation metrics sent by NetworkMonitor. + * + * Metrics are sent by default. They can be disabled by setting the flag to a number greater + * than the APK version (for example 999999999). + * @see #isFeatureEnabled(Context, String, String, boolean) + */ + public static final String VALIDATION_METRICS_VERSION = "validation_metrics_version"; + static { System.loadLibrary("networkstackutilsjni"); } @@ -348,6 +357,9 @@ public class NetworkStackUtils { * {@link DeviceConfig} is enabled by comparing NetworkStack module version {@link NetworkStack} * with current version of property. If this property version is valid, the corresponding * experimental feature would be enabled, otherwise disabled. + * + * This is useful to ensure that if a module install is rolled back, flags are not left fully + * rolled out on a version where they have not been well tested. * @param context The global context information about an app environment. * @param namespace The namespace containing the property to look up. * @param name The name of the property to look up. @@ -363,6 +375,9 @@ public class NetworkStackUtils { * {@link DeviceConfig} is enabled by comparing NetworkStack module version {@link NetworkStack} * with current version of property. If this property version is valid, the corresponding * experimental feature would be enabled, otherwise disabled. + * + * This is useful to ensure that if a module install is rolled back, flags are not left fully + * rolled out on a version where they have not been well tested. * @param context The global context information about an app environment. * @param namespace The namespace containing the property to look up. * @param name The name of the property to look up. |