From f914b774141a3f7b95ba49043584340feea727fe Mon Sep 17 00:00:00 2001 From: Chiachang Wang Date: Thu, 25 Apr 2019 23:58:27 +0800 Subject: [PATCH] Add validation type definition to support multiple probe result In order to allow NetworkMonitor to tell ConnectivityService if the network is either parital, validated or both. NetworkMonitor could update the probe result by passing the bitmask to ConnectivityService. Bug: 130078798 Bug: 130683832 Test: build Change-Id: I429ccbd9b9afae3eafaf73b3c9eb835213c1f64d --- services/net/java/android/net/INetworkMonitor.aidl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/services/net/java/android/net/INetworkMonitor.aidl b/services/net/java/android/net/INetworkMonitor.aidl index b32ef12ab24d3..3fc81a3dadc5c 100644 --- a/services/net/java/android/net/INetworkMonitor.aidl +++ b/services/net/java/android/net/INetworkMonitor.aidl @@ -40,6 +40,20 @@ oneway interface INetworkMonitor { // for https probe. const int NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY = 2; + // Network validation flags indicate probe result and types. If no NETWORK_VALIDATION_RESULT_* + // are set, then it's equal to NETWORK_TEST_RESULT_INVALID. If NETWORK_VALIDATION_RESULT_VALID + // is set, then the network validates and equal to NETWORK_TEST_RESULT_VALID. If + // NETWORK_VALIDATION_RESULT_PARTIAL is set, then the network has partial connectivity which + // is equal to NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY. NETWORK_VALIDATION_PROBE_* is set + // when the specific probe result of the network is resolved. + const int NETWORK_VALIDATION_RESULT_VALID = 0x01; + const int NETWORK_VALIDATION_RESULT_PARTIAL = 0x02; + const int NETWORK_VALIDATION_PROBE_DNS = 0x04; + const int NETWORK_VALIDATION_PROBE_HTTP = 0x08; + const int NETWORK_VALIDATION_PROBE_HTTPS = 0x10; + const int NETWORK_VALIDATION_PROBE_FALLBACK = 0x20; + const int NETWORK_VALIDATION_PROBE_PRIVDNS = 0x40; + void start(); void launchCaptivePortalApp(); void notifyCaptivePortalAppFinished(int response);