OSDN Git Service

Support partial connectivity probe result option
authorChiachang Wang <chiachangwang@google.com>
Tue, 12 Mar 2019 10:28:24 +0000 (18:28 +0800)
committerChiachang Wang <chiachangwang@google.com>
Tue, 12 Mar 2019 10:28:24 +0000 (18:28 +0800)
Bug: 124629963
Test: atest NetworkStackTests
Change-Id: I1c22bad6ba94d23892e8907d6e7b28d074922339

core/proto/android/server/connectivity/data_stall_event.proto
packages/NetworkStack/src/android/net/metrics/DataStallStatsUtils.java

index 21717d8..a82326f 100644 (file)
@@ -25,6 +25,7 @@ enum ProbeResult {
     VALID = 1;
     INVALID = 2;
     PORTAL = 3;
+    PARTIAL = 4;
 }
 
 enum ApBand {
@@ -86,4 +87,4 @@ message DnsEvent {
     repeated int32 dns_return_code = 1;
     // Indicate the timestamp of the dns event.
     repeated int64 dns_time = 2;
-}
\ No newline at end of file
+}
index 17a36ad..c96411e 100644 (file)
@@ -46,6 +46,8 @@ public class DataStallStatsUtils {
             return DataStallEventProto.VALID;
         } else if (result.isPortal()) {
             return DataStallEventProto.PORTAL;
+        } else if (result.isPartialConnectivity()) {
+            return DataStallEventProto.PARTIAL;
         } else {
             return DataStallEventProto.INVALID;
         }