diff options
| author | 2021-04-09 01:17:31 +0000 | |
|---|---|---|
| committer | 2021-04-09 01:17:31 +0000 | |
| commit | 4b24e01c29d462b156a95a3c8dc6d30fb77eebba (patch) | |
| tree | 53cb462a1bbf2433d4d475b87138c03486987f60 | |
| parent | 226c9332af7a181a9145ba40c878fc25fdd5ac95 (diff) | |
| parent | 3dd880eca50cf379926fc26e9a5c0d50cc50f953 (diff) | |
Merge "Improve documentation on simulateDataStall" am: 3dd880eca5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669505
Change-Id: Idc8f1f13e8b0553cda6f242b95ea72f79f54b9b5
| -rw-r--r-- | packages/Connectivity/framework/src/android/net/ConnectivityManager.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/Connectivity/framework/src/android/net/ConnectivityManager.java b/packages/Connectivity/framework/src/android/net/ConnectivityManager.java index 9fbf04952f13..0418450ccda9 100644 --- a/packages/Connectivity/framework/src/android/net/ConnectivityManager.java +++ b/packages/Connectivity/framework/src/android/net/ConnectivityManager.java @@ -44,6 +44,7 @@ import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; +import android.net.ConnectivityDiagnosticsManager.DataStallReport.DetectionMethod; import android.net.IpSecManager.UdpEncapsulationSocket; import android.net.SocketKeepalive.Callback; import android.net.TetheringManager.StartTetheringCallback; @@ -5104,10 +5105,13 @@ public class ConnectivityManager { * * <p>This method should only be used for tests. * - * <p>The caller must be the owner of the specified Network. + * <p>The caller must be the owner of the specified Network. This simulates a data stall to + * have the system behave as if it had happened, but does not actually stall connectivity. * * @param detectionMethod The detection method used to identify the Data Stall. - * @param timestampMillis The timestamp at which the stall 'occurred', in milliseconds. + * See ConnectivityDiagnosticsManager.DataStallReport.DETECTION_METHOD_*. + * @param timestampMillis The timestamp at which the stall 'occurred', in milliseconds, as per + * SystemClock.elapsedRealtime. * @param network The Network for which a Data Stall is being simluated. * @param extras The PersistableBundle of extras included in the Data Stall notification. * @throws SecurityException if the caller is not the owner of the given network. @@ -5116,7 +5120,7 @@ public class ConnectivityManager { @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @RequiresPermission(anyOf = {android.Manifest.permission.MANAGE_TEST_NETWORKS, android.Manifest.permission.NETWORK_STACK}) - public void simulateDataStall(int detectionMethod, long timestampMillis, + public void simulateDataStall(@DetectionMethod int detectionMethod, long timestampMillis, @NonNull Network network, @NonNull PersistableBundle extras) { try { mService.simulateDataStall(detectionMethod, timestampMillis, network, extras); |