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, 3 Aug 2018 19:05:29 +0000 (19:05 +0000)
commitdf55e0aef345d86e51a2da6b69a1b1f64eea2ad4
tree6e53ba22e6ad6d5ce4a6762cd84dfdc7e98a3986
parent51f7f6bd1f064450bf5e8bc6e0fe74f44927ae38
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