Home
last modified time | relevance | path

Searched refs:CaptivePortalProbeResult (Results 1 – 10 of 10) sorted by relevance

/packages/modules/NetworkStack/common/captiveportal/src/android/net/captiveportal/
DCaptivePortalProbeResult.java32 public class CaptivePortalProbeResult { class
52 public static final CaptivePortalProbeResult PRIVATE_IP =
53 new CaptivePortalProbeResult(DNS_PRIVATE_IP_RESPONSE_CODE, 1 << PROBE_HTTP);
56 public static final CaptivePortalProbeResult PARTIAL = new CaptivePortalProbeResult(
86 public CaptivePortalProbeResult(int httpResponseCode, @ProbeType int probeType) { in CaptivePortalProbeResult() method in CaptivePortalProbeResult
90 public CaptivePortalProbeResult(int httpResponseCode, @Nullable String redirectUrl, in CaptivePortalProbeResult() method in CaptivePortalProbeResult
95 public CaptivePortalProbeResult(int httpResponseCode, @Nullable String redirectUrl, in CaptivePortalProbeResult() method in CaptivePortalProbeResult
141 public static CaptivePortalProbeResult failed(@ProbeType int probeType) { in failed()
142 return new CaptivePortalProbeResult(FAILED_CODE, probeType); in failed()
150 public static CaptivePortalProbeResult success(@ProbeType int probeType) { in success()
[all …]
DCaptivePortalProbeSpec.java19 import static android.net.captiveportal.CaptivePortalProbeResult.PORTAL_CODE;
20 import static android.net.captiveportal.CaptivePortalProbeResult.SUCCESS_CODE;
146 public abstract CaptivePortalProbeResult getResult(int status, @Nullable String locationHeader); in getResult()
187 public CaptivePortalProbeResult getResult(int status, String locationHeader) { in getResult()
191 return new CaptivePortalProbeResult( in getResult()
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/
DDataStallStatsUtilsTest.kt20 import android.net.captiveportal.CaptivePortalProbeResult
51 CaptivePortalProbeResult.failed(ValidationProbeEvent.PROBE_HTTP)), in testProbeResultToEnum()
54 CaptivePortalProbeResult.failed(ValidationProbeEvent.PROBE_HTTPS)), in testProbeResultToEnum()
57 CaptivePortalProbeResult.success(ValidationProbeEvent.PROBE_HTTP)), in testProbeResultToEnum()
60 CaptivePortalProbeResult.success(ValidationProbeEvent.PROBE_HTTP)), in testProbeResultToEnum()
62 assertEquals(DataStallStatsUtils.probeResultToEnum(CaptivePortalProbeResult.PARTIAL), in testProbeResultToEnum()
64 assertEquals(DataStallStatsUtils.probeResultToEnum(CaptivePortalProbeResult( in testProbeResultToEnum()
65 CaptivePortalProbeResult.PORTAL_CODE, ValidationProbeEvent.PROBE_HTTP)), in testProbeResultToEnum()
67 assertEquals(DataStallStatsUtils.probeResultToEnum(CaptivePortalProbeResult( in testProbeResultToEnum()
68 CaptivePortalProbeResult.PORTAL_CODE, ValidationProbeEvent.PROBE_HTTPS)), in testProbeResultToEnum()
[all …]
DNetworkValidationMetricsTest.java32 import android.net.captiveportal.CaptivePortalProbeResult;
76 verifyProbeType(new CaptivePortalProbeResult(CaptivePortalProbeResult.SUCCESS_CODE, in testNetworkValidationMetrics_VerifyHttpProbeResultToEnum()
78 verifyProbeType(new CaptivePortalProbeResult(CaptivePortalProbeResult.FAILED_CODE, in testNetworkValidationMetrics_VerifyHttpProbeResultToEnum()
80 verifyProbeType(new CaptivePortalProbeResult(CaptivePortalProbeResult.PORTAL_CODE, in testNetworkValidationMetrics_VerifyHttpProbeResultToEnum()
82 verifyProbeType(CaptivePortalProbeResult.PRIVATE_IP, ProbeResult.PR_PRIVATE_IP_DNS); in testNetworkValidationMetrics_VerifyHttpProbeResultToEnum()
85 private void verifyProbeType(CaptivePortalProbeResult inputResult, in verifyProbeType()
/packages/modules/NetworkStack/src/com/android/server/connectivity/
DNetworkMonitor.java108 import android.net.captiveportal.CaptivePortalProbeResult;
490 private CaptivePortalProbeResult mLastPortalProbeResult =
491 CaptivePortalProbeResult.failed(CaptivePortalProbeResult.PROBE_UNKNOWN);
1097 private void maybeWriteDataStallStats(@NonNull final CaptivePortalProbeResult result) { in maybeWriteDataStallStats()
1185 final CaptivePortalProbeResult probeRes = mLastPortalProbeResult; in processMessage()
1245 mLastPortalProbeResult = new CaptivePortalProbeResult( in enter()
1246 CaptivePortalProbeResult.PORTAL_CODE, in enter()
1249 CaptivePortalProbeResult.PROBE_UNKNOWN); in enter()
1580 final CaptivePortalProbeResult probeResult = in processMessage()
1581 (CaptivePortalProbeResult) message.obj; in processMessage()
[all …]
/packages/modules/NetworkStack/src/com/android/networkstack/metrics/
DDataStallStatsUtils.java19 import android.net.captiveportal.CaptivePortalProbeResult;
47 public static int probeResultToEnum(@Nullable final CaptivePortalProbeResult result) { in probeResultToEnum()
65 @NonNull final CaptivePortalProbeResult result) { in write()
DNetworkValidationMetrics.java31 import android.net.captiveportal.CaptivePortalProbeResult;
153 public static ProbeResult httpProbeResultToEnum(final CaptivePortalProbeResult result) { in httpProbeResultToEnum()
/packages/modules/NetworkStack/tests/unit/src/android/net/captiveportal/
DCaptivePortalProbeSpecTest.java159 private void assertPortal(CaptivePortalProbeResult result) { in assertPortal()
163 private void assertSuccess(CaptivePortalProbeResult result) { in assertSuccess()
167 private void assertFailed(CaptivePortalProbeResult result) { in assertFailed()
/packages/modules/NetworkStack/src/android/net/captiveportal/
DCapportApiProbeResult.java27 public class CapportApiProbeResult extends CaptivePortalProbeResult {
32 public CapportApiProbeResult(@NonNull CaptivePortalProbeResult result, in CapportApiProbeResult()
/packages/modules/NetworkStack/tests/unit/src/com/android/server/connectivity/
DNetworkMonitorTest.java116 import android.net.captiveportal.CaptivePortalProbeResult;
2110 final ArgumentCaptor<CaptivePortalProbeResult> probeResultCaptor =
2111 ArgumentCaptor.forClass(CaptivePortalProbeResult.class);
2487 CaptivePortalProbeResult.success(1 << PROBE_HTTP));
2496 CaptivePortalProbeResult.failed(1 << PROBE_HTTP));