diff options
author | Remi NGUYEN VAN <reminv@google.com> | 2020-07-06 03:11:46 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-06 03:11:46 +0000 |
commit | 63e923abc2206a4df91135a8ab0e91d66aa6d9ad (patch) | |
tree | 1fb9ae79902d27934a5b94334331628d580e02ee /src/android/net/util/NetworkStackUtils.java | |
parent | a0428bfc7c2b1eb1b2a9f9252378e5e93ff64ba1 (diff) | |
parent | bf45240a2ac9dc17240bfff6596aee64e1d70a28 (diff) |
Merge "Refine validation metrics" into rvc-dev am: bf45240a2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/NetworkStack/+/12004083
Change-Id: I72acf198cf58456294ac02ce340f406f73799bbb
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. |