OSDN Git Service

DO NOT MERGE: Fix ConnectivityController meteredness checks
authorBenedict Wong <benedictwong@google.com>
Fri, 4 May 2018 04:07:58 +0000 (21:07 -0700)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Fri, 10 Aug 2018 20:27:41 +0000 (20:27 +0000)
commit007288b7a9177b63e312d8a6e3c6f33007066ad7
tree6e53ba22e6ad6d5ce4a6762cd84dfdc7e98a3986
parent13343c13591f6a3054eee33c2748bf656d7e90f3
DO NOT MERGE: Fix ConnectivityController meteredness checks

This patch corrects ConnectivityController's meteredness checks to
perform correct meteredness checks while VPNs are running. This fixes a
bug in O-MR1 where any apps using the DownloadProvider with unmetered
network constraints fail to start while the VPN is enabled.

This change adds a bespoke method for ConnectivityController, allowing
it to correctly identify the meteredness without affecting public API
surfaces.

Bug: 78644887
Test: Built, flashed on Walleye, and tested.
Test: Additional test coverage in subsequent patch(es).
Change-Id: Ie1d11d93d51d936ce81cd5984af61bde30325983
(cherry picked from commit d08ab5a641d9d81314c9439724dd34338fa81d58)
core/java/android/net/ConnectivityManager.java
core/java/android/net/IConnectivityManager.aidl
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/job/controllers/ConnectivityController.java