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

Commit 3bbbde8b 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

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

Change-Id: I28db7bfb5a558b6f9ea8e5bd7384ea09265ad086
parents 1f1881ac d95069eb
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);
    }