OSDN Git Service

Separate NetworkMonitor/framework portal URL
authorRemi NGUYEN VAN <reminv@google.com>
Wed, 20 Mar 2019 05:22:49 +0000 (14:22 +0900)
committerRemi NGUYEN VAN <reminv@google.com>
Fri, 22 Mar 2019 06:11:14 +0000 (15:11 +0900)
commit0bd294cd55ae558b15bd760c8220a7b816ee946e
treeba0a32701a177f518cdf5b35f65034760436990d
parent64bb980f457d843026fd301e05b666a84441d96d
Separate NetworkMonitor/framework portal URL

The framework cannot return URLs used by the updatable NetworkStack,
which may use configurable URLs, changing URLs, or mechanisms not
involving URLs to detect captive portals. NetworkMonitor has already
been using random fallback URLs for a while that do not match the value
returned by ConnectivityManager#getCaptivePortalServerUrl.

With this change, the default value returned by the framework is
configured in framework resources as
config_networkDefaultCaptivePortalServerUrl. NetworkMonitor behavior may
change as it is an updatable component, but the current URL is
configured in NetworkMonitor resources as
config_captive_portal_http_url.

Test: flashed, booted, WiFi and captive portal working
Test: ConnectivityManager#getCaptivePortalServerUrl returns correct
      value.
Bug: 127908503
Change-Id: I371dedc5b22efa909d7fd58e1ebe9b8aaced9780
core/java/android/net/ConnectivityManager.java
core/res/res/values/config.xml
core/res/res/values/symbols.xml
packages/NetworkStack/res/values/config.xml [new file with mode: 0644]
packages/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java
services/core/java/com/android/server/ConnectivityService.java
services/net/java/android/net/shared/NetworkMonitorUtils.java