OSDN Git Service

Package changed/removed listeners for always-on VPN
authorRobin Lee <rgl@google.com>
Fri, 13 May 2016 14:38:08 +0000 (15:38 +0100)
committerRobin Lee <rgl@google.com>
Mon, 6 Jun 2016 15:42:50 +0000 (15:42 +0000)
commit812800cb92090db31f609b907c4458ba76cf7f42
tree860802f8251842fd99e1748391d4d3c232f0db1d
parent258aa3e56b02b95e8e855ef949a29babe178b4a5
Package changed/removed listeners for always-on VPN

Fix 2 problems of always-on vpn after always-on package is removed
1. Prevent network being locked down (blocking all network traffic)
   Otherwise, user has no way to download the vpn app from Play Store,
   and never be able to gain control of the network again.
2. Allow user to connect other vpn app.

Implementation
1. Switch off always-on mode if the package gets removed.
2. Restart always-on mode if the package gets replaced/upgraded.

Bug: 29050764
Change-Id: Id3e389ae0b11c6002a5167919292d9634c2014cb
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/connectivity/Vpn.java