Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b8a2155 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by Automerger Merge Worker
Browse files

Add logs on invalid test probe URLs am: d95069eb am: 3bbbde8b

Original change: https://android-review.googlesource.com/c/platform/packages/modules/NetworkStack/+/1826055

Change-Id: I29f2d32f89dfc673308de1e680082317ee580f02
parents e292c8ed 3bbbde8b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1986,11 +1986,17 @@ public class NetworkMonitor extends StateMachine {
        }

        final long now = System.currentTimeMillis();
        if (expTime < now || (expTime - now) > TEST_URL_EXPIRATION_MS) return null;
        if (expTime < now || (expTime - now) > TEST_URL_EXPIRATION_MS) {
            logw("Skipping test URL with expiration " + expTime + ", now " + now);
            return null;
        }

        final String strUrl = mDependencies.getDeviceConfigProperty(NAMESPACE_CONNECTIVITY,
                key, null /* defaultValue */);
        if (!isValidTestUrl(strUrl)) return null;
        if (!isValidTestUrl(strUrl)) {
            logw("Skipping invalid test URL " + strUrl);
            return null;
        }
        return makeURL(strUrl);
    }