Forward unknown Data Stall types to Connectivity Diagnostics.

This CL forwards suspected Data Stall events detected with unknown
detection methods to ConnectivityDiagnostics.

Currently, ConnectivityService drops any data stall events with unknown
detection methods, which leads to false negatives for Connectivity
Diagnostics registrants. This change ensures that registrants will still
be notified as NetworkStack is updated to use new detection methods.

The documentation for ConnectivityDiagnosticsManager#DataStallReport is
also updated to reflect that the detection methods included in the
report are a bit mask of detection methods used. Implicitly, this means
that data stalls detected via unknown methods will have an empty bit
mask (0x00).

Bug: 156294356
Test: atest ConnectivityDiagnosticsManager
Change-Id: I62d0bf91fcc17c7921afd519c72551399906bd6b
Merged-In: I62d0bf91fcc17c7921afd519c72551399906bd6b
(cherry picked from commit a1d9d811a05bf3447ebb90a39343b53eee79f0db)
This commit is contained in:
Cody Kesting 2020-05-22 00:28:02 +00:00
commit e7d4aa8d99

View file

@ -437,7 +437,7 @@ public class ConnectivityDiagnosticsManager {
*/
private long mReportTimestamp;
/** The detection method used to identify the suspected data stall */
/** A bitmask of the detection methods used to identify the suspected data stall */
@DetectionMethod private final int mDetectionMethod;
/** LinkProperties available on the Network at the reported timestamp */
@ -499,9 +499,9 @@ public class ConnectivityDiagnosticsManager {
}
/**
* Returns the detection method used to identify this suspected data stall.
* Returns the bitmask of detection methods used to identify this suspected data stall.
*
* @return The detection method used to identify the suspected data stall
* @return The bitmask of detection methods used to identify the suspected data stall
*/
public int getDetectionMethod() {
return mDetectionMethod;