summaryrefslogtreecommitdiff
path: root/src/android/net/util/NetworkStackUtils.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2020-07-06 03:26:19 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-06 03:26:19 +0000
commite99c5ee2051025f5c7f9225f4576d5123e30a6e8 (patch)
treea470cd812f16e554f17faaa379485087eb07bb14 /src/android/net/util/NetworkStackUtils.java
parente1cabba716f66dd8197f0c19bb6502af8cae9c24 (diff)
parent63e923abc2206a4df91135a8ab0e91d66aa6d9ad (diff)
Merge "Refine validation metrics" into rvc-dev am: bf45240a2a am: 63e923abc2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/NetworkStack/+/12004083 Change-Id: I91fcb23b9c1511b2c830899c9cbbd64bc2201ac3
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
-rwxr-xr-xsrc/android/net/util/NetworkStackUtils.java15
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.