Fix CaptivePortalTest before R

The last change broke the test on Q and R. Fix it to check
Q and R behavior properly, so the test can be run in presubmit
on such devices too.

Bug: 181844595
Change-Id: I99847ea30d49d690d9011d4763a7345126807119
Test: atest CtsNetTestCasesLatestSdk
1 file changed