diff options
author | Chiachang Wang <chiachangwang@google.com> | 2019-03-31 22:07:17 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-31 22:07:17 -0700 |
commit | 839d975cdd656933e9e32f57301353b5eafa6914 (patch) | |
tree | 38f1a8178748be26e13a1e0731b58d091c024d96 /src/android/net/util/NetworkStackUtils.java | |
parent | a4c8a532a46f5af189f696eb7f118d3384d17bce (diff) | |
parent | 7c9849b77183735f79fb85c6c4180847d5957b38 (diff) |
Merge "Provide link to android experimental flags API"
am: 9876efdabe
Change-Id: I1c02f0725728c6cfe2d040071bcdb0bead71b510
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
-rw-r--r-- | src/android/net/util/NetworkStackUtils.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/android/net/util/NetworkStackUtils.java b/src/android/net/util/NetworkStackUtils.java index fedb8d1..670563c 100644 --- a/src/android/net/util/NetworkStackUtils.java +++ b/src/android/net/util/NetworkStackUtils.java @@ -17,6 +17,7 @@ package android.net.util; import android.annotation.NonNull; +import android.annotation.Nullable; import android.util.SparseArray; import java.io.FileDescriptor; @@ -81,4 +82,19 @@ public class NetworkStackUtils { } return false; } + + /** + * 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. + */ + @Nullable + public static String getDeviceConfigProperty(@NonNull String namespace, @NonNull String name, + @Nullable String defaultValue) { + // TODO: Link to DeviceConfig API once it is ready. + return defaultValue; + } } |