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)
committerBenedict Wong <benedictwong@google.com>
Thu, 24 May 2018 06:15:36 +0000 (23:15 -0700)
commitd08ab5a641d9d81314c9439724dd34338fa81d58
tree7908c1f08e631d28cd7c4f142107aeea077b4696
parentaa55d5db766bb18d82029bf92be02b33d07c57d2
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
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