OSDN Git Service

Only show "Connected" note after opening portal
authorRemi NGUYEN VAN <reminv@google.com>
Tue, 25 Jun 2019 16:40:54 +0000 (09:40 -0700)
committerRemi NGUYEN VAN <reminv@google.com>
Wed, 26 Jun 2019 01:55:51 +0000 (01:55 +0000)
commit455277943e458b1bcdfe0d91f3b2748d0a481aed
tree9d45033d1b56d290d3058c6b0ba248fd2741b1ad
parent88d88df17436f53894dd14c0523c1d53148cec79
Only show "Connected" note after opening portal

The "Connected" notification would be shown every time a network
validates after being identified as a captive portal. This causes issues
on networks that have auto-login mechanisms, as a high priority
notification would be shown even though the user was not interacting
with the phone.

The "Connected" notification is intended to confirm to the user that
they successfuly logged in (manually), so only show it after the user
opens the portal on the network.

Bug: 134124044
Test: Flashed, connected to portal: notification shown
      Opened portal from command line + revalidate: no notification
      Tests passing with change, failing without
Merged-In: I99be7d312d020d242081971c7e522023bbbab072
Merged-In: I7dc1b3a313b255fe89313efb9117bb160efdb533
(cherry picked from commit 0b5a4d862190320d285413b1feb921144fee8420)

Change-Id: I67c124cc34f09c2f186706b5cec839f60d00a90a
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
tests/net/java/com/android/server/ConnectivityServiceTest.java