Commit Graph

4227 Commits

Author SHA1 Message Date
Hugo Benichi
fecebf94a2 Merge "ConnectivityServiceTest: fix testNetworkInfoOfTypeNone" am: 1f0d765378 am: 9efd050236
am: b1894abbc5

Change-Id: I458a0fdae874039e0f1d5cd38ed8ad0a1754bba9
2017-07-19 08:15:12 +00:00
Hugo Benichi
9efd050236 Merge "ConnectivityServiceTest: fix testNetworkInfoOfTypeNone"
am: 1f0d765378

Change-Id: I4be1d2ce67871c1e01364beca886fdd3af374321
2017-07-19 08:04:48 +00:00
Treehugger Robot
1f0d765378 Merge "ConnectivityServiceTest: fix testNetworkInfoOfTypeNone" 2017-07-19 07:54:45 +00:00
Hugo Benichi
a6fe35a841 ConnectivityServiceTest: fix testNetworkInfoOfTypeNone
This patch fixes a couple of flakyness issues with
testNetworkInfoOfTypeNone. It also fixes some typos and naming issues.

Bug: 62918393, 62918393
Test: runtest frameworks-net
Change-Id: I1c56557ab113d3ef57dbc06a6e882634d03c5b09
2017-07-19 15:08:49 +09:00
The Android Automerger
260b8cec60 Manually merge commit '530b93aae428'
* commit '530b93aae428':
  NetworkCapabilities: Unhide TRANSPORT_LOWPAN

BUG:31038431
2017-07-19 00:27:08 +00:00
Robert Quattlebaum
6b6c6d45e2 Merge "NetworkCapabilities: Unhide TRANSPORT_LOWPAN" am: 1d4be0ece6 am: d1ce5a4ca7
am: dbc78509ae

Change-Id: I017036f8c63ea1e9c1934daad55ef087b3a83012
2017-07-18 23:51:04 +00:00
Robert Quattlebaum
d1ce5a4ca7 Merge "NetworkCapabilities: Unhide TRANSPORT_LOWPAN"
am: 1d4be0ece6

Change-Id: I3ae9566ca52b9dae87cace18b1e97897eb8de0ad
2017-07-18 23:33:08 +00:00
Treehugger Robot
1d4be0ece6 Merge "NetworkCapabilities: Unhide TRANSPORT_LOWPAN" 2017-07-18 23:09:58 +00:00
Charles He
b0c5ede751 Merge "Opt-out for always-on VPN" 2017-07-18 18:47:45 +00:00
TreeHugger Robot
f7d4d8c694 Merge "IP connectivity metrics: fix tests after proto update" 2017-07-18 07:58:33 +00:00
Hugo Benichi
43b7474c08 IP connectivity metrics: fix tests after proto update
Update to ipconnectivity.proto in commit
6d2f506bfd788a3685292d404dc9d82a27357cfe broke the associated unit
tests (Change-Id: I4cf5b95956df721aecd63fddfb026a7266c190b9)

Bug: 34901696
Test: runtest frameworks-net
Change-Id: I57a6bad8a9836b1c45690c4589b416786ce1dfa0
2017-07-18 14:33:12 +09:00
Charles He
9369e61e2d Opt-out for always-on VPN
Always-on VPN is a feature introduced in N. Since then, all VPN apps
targeting N+ are assumed to support the feature, and the user or the DPC
can turn on / off always-on for any such VPN app. However, a few VPN
apps are not designed to support the always-on feature. Enabling
always-on for these apps will result in undefined behavior and confusing
"Always-on VPN disconnected" notification.

This feature provides a new manifest meta-data field through which a VPN
app can opt out of the always-on feature explicitly. This will stop the
always-on feature from being enabled for the app, both by the user and
by the DPC, and will clear its existing always-on state.

A @hide API is provided to check whether an app supports always-on VPN.
Documentation is updated to reflect the behavior change.

Bug: 36650087
Test: runtest --path java/com/android/server/connectivity/VpnTest.java
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'

Change-Id: I477897a29175e3994d4ecf8ec546e26043c90f13
2017-07-18 00:55:38 +01:00
Jeff Sharkey
558f97651f Merge "Move "metered" persistence to WifiConfiguration." 2017-07-14 17:48:02 +00:00
Jeff Sharkey
adebffc134 Move "metered" persistence to WifiConfiguration.
For a long time we've had a nasty tangled dependency between Wi-Fi
and NPMS, since they both persisted different details for configured
networks.  As part of preparing for new carrier data plan APIs, move
the tracking of meteredness over to WifiConfiguration.

This also cleans up how meteredness is communicated through
NetworkAgents to rely completely on NET_CAPABILITY_NOT_METERED by
removing the metered flag on NetworkInfo, which has caused confusion
and staleness.

Migrates any existing user-configured metered networks over to
WifiConfiguration once the device finishes booting.

Remove support for NetworkQuotaInfo, since this information can no
longer be made available to apps.  Frustratingly, some apps are
using it, so keep the object around returning stub values, and shame
them in the logs.

Bug: 63391323
Test: builds, boots, Wi-Fi policy is upgraded
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I64f865ddeb65cfcd330f8d2a847368abdf960a07
2017-07-14 11:46:31 -06:00
Hugo Benichi
d3499db8ac resolve merge conflicts of 4f2a0fe213e5 to stage-aosp-master am: df167a5d02 am: 164ff8a2ed
am: afa6509e39  -s ours

Change-Id: Ie43a31dc8ccc156383c8ab24a255e0683a44622a
2017-07-14 00:55:52 +00:00
Hugo Benichi
afa6509e39 resolve merge conflicts of 4f2a0fe213e5 to stage-aosp-master am: df167a5d02
am: 164ff8a2ed

Change-Id: I08195e119f866acc9fe1795b892fe45cea3c7f47
2017-07-14 00:46:49 +00:00
Hugo Benichi
df167a5d02 resolve merge conflicts of 4f2a0fe213e5 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I61cfb2d4798350f28f1bb36aed67ee8f18895031
2017-07-14 07:25:51 +09:00
Hugo Benichi
57224928a7 IpManager: define InitialConfiguration
This patch adds a InitialConfiguration class to IpManager for specifying
IP information in IpManager ProvisioningConfiguration at IpManager
startup.

At the moment this InitialConfiguration is not used, but is validated in
startProvsiioning if ProvisioningConfiguration includes one. It will be
integrated into IpManager IP provisioning logic in follow-up patches.

This patch also includes an example of data driven unit tests using a
table of test case. The highlights of this methodology are:
  1) easy extensibility for new test case,
  2) rich and informative error messages,
Unfortunately Java support for inlined data structure literals is poor
and some companion static methods for data generation are required for
enabling this methodology.

Bug: 62988545
Test: added new test in FrameworksNetTests,
      $ runtest frameworks-net
      $ runtest frameworks-wifi
Merged-In: I060b02603af7d73a6407df89344bf0c000574af2

(cherry pick of commit c8a0b1b80c)

Change-Id: I48dbf89232d7758f1b07ed4d76ce93281e5c6b53
2017-07-14 04:26:42 +09:00
Hugo Benichi
c8a0b1b80c IpManager: define InitialConfiguration
This patch adds a InitialConfiguration class to IpManager for specifying
IP information in IpManager ProvisioningConfiguration at IpManager
startup.

At the moment this InitialConfiguration is not used, but is validated in
startProvsiioning if ProvisioningConfiguration includes one. It will be
integrated into IpManager IP provisioning logic in follow-up patches.

This patch also includes an example of data driven unit tests using a
table of test case. The highlights of this methodology are:
  1) easy extensibility for new test case,
  2) rich and informative error messages,
Unfortunately Java support for inlined data structure literals is poor
and some companion static methods for data generation are required for
enabling this methodology.

Bug: 62988545
Test: added new test in FrameworksNetTests,
      $ runtest frameworks-net
      $ runtest frameworks-wifi

Change-Id: I060b02603af7d73a6407df89344bf0c000574af2
2017-07-13 22:42:50 +09:00
Calvin On
6d9ea9a437 DO NOT MERGE ANYWHERE: Allow NetTransitionWakelock to be overridden via Settings
Bug: 30574433
Change-Id: If0d2a0b99266d60557623105728feace9ea16943
2017-07-13 00:27:45 +00:00
Andreas Gampe
16f14321b0 Merge "Connectivity: Fix format arguments" am: ba8ab362ad am: df94ba0ad7 am: ce4c57fd0e
am: 9c87a80662

Change-Id: I8b0734e5d786999e1b520164b78ed72f453185e0
2017-07-12 05:08:02 +00:00
Andreas Gampe
9c87a80662 Merge "Connectivity: Fix format arguments" am: ba8ab362ad am: df94ba0ad7
am: ce4c57fd0e

Change-Id: Ia789f019394b7870994fcce8e64dee3b0501f7c1
2017-07-12 05:00:56 +00:00
Andreas Gampe
df94ba0ad7 Merge "Connectivity: Fix format arguments"
am: ba8ab362ad

Change-Id: I844c7d1faea3dcc90cf9816cae984277d7525f15
2017-07-12 04:48:10 +00:00
Andreas Gampe
f1c0a31065 Connectivity: Fix format arguments
Fix missing argument.

Bug: 19797138
Test: m
Change-Id: I5fdd2a453c0d7422e8c3e79c8dce2d0800ec45e9
2017-07-11 18:21:15 -07:00
Robert Quattlebaum
4e64b627bb NetworkCapabilities: Unhide TRANSPORT_LOWPAN
This commit simply unhides the constant `TRANSPORT_LOWPAN` in the class
`android.net.NetworkCapabilities`, adding it to the public API.

Bug: b/63600204
Change-Id: I794635814c0bd3891cd22fcc1e31614e4d6ac654
2017-07-11 18:16:09 -07:00
Hugo Benichi
508bdba401 Merge "NetworkCapabilities: Added support for TRANSPORT_LOWPAN" into stage-aosp-master am: 6ab950dd5f am: 6659fdba55 -s ours
am: 7f28a4bb9a  -s ours

Change-Id: Ibe84e68d5224833b92e64e917123d835b7cca46f
2017-07-11 10:34:14 +00:00
Hugo Benichi
7f28a4bb9a Merge "NetworkCapabilities: Added support for TRANSPORT_LOWPAN" into stage-aosp-master am: 6ab950dd5f
am: 6659fdba55  -s ours

Change-Id: I30a343b25381f201cad4bff45df4ab6a1cf38e34
2017-07-11 10:24:15 +00:00
Robert Quattlebaum
f1132ede8c NetworkCapabilities: Added support for TRANSPORT_LOWPAN
This change simply adds a new constant, `TRANSPORT_LOWPAN`, for
identifying low-power wireless networks like Thread.

Bug: b/33073713
Test: builds
Change-Id: I50d9b8df1a0270e06c28f001adf6c52a142a85af
Merged-In: Ie4aa77496f8ff466fa1a5fbc556e9c029457a689

(cherry pick from commit 103292d0b7)
2017-07-11 15:52:37 +09:00
Android Build Merger (Role)
176af3ed67 Merge "Merge "Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6" into oc-dr1-dev-plus-aosp am: b66be1a4db" 2017-07-06 16:30:15 +00:00
Android Build Merger (Role)
b45429ba13 Merge "Merge "Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6" into oc-dr1-dev-plus-aosp am: b66be1a4db" 2017-07-06 16:29:52 +00:00
Lorenzo Colitti
d272930f7d Merge "Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6" into oc-dr1-dev-plus-aosp
am: b66be1a4db

Change-Id: Ic69cc209c2afbb99580998bb77f3b7df80afe8be
2017-07-06 16:29:04 +00:00
Lorenzo Colitti
74b9271702 Merge "Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6" into oc-dr1-dev-plus-aosp
am: b66be1a4db

Change-Id: Iaafa4739f5e116fd94c60d662f9c9d09d56fe06e
2017-07-06 16:28:32 +00:00
Android Build Merger (Role)
c9e2235446 Merge "Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6 am: 97eec7adbb" 2017-07-06 16:27:32 +00:00
Lorenzo Colitti
83e5900498 Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6
am: 97eec7adbb

Change-Id: I083aac710590a461f2c12735e0daaf35a6f35387
2017-07-06 16:25:48 +00:00
Lorenzo Colitti
522149f33d Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6
am: 97eec7adbb

Change-Id: I0c25ea79b2f62fa548c4ed5cccb398530f138822
2017-07-06 16:25:24 +00:00
Android Build Merger (Role)
b66be1a4db Merge "Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6" into oc-dr1-dev-plus-aosp 2017-07-06 16:10:57 +00:00
Lorenzo Colitti
d14f673516 Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev
am: d2eef601f6

Change-Id: I8297ca8d29d3aab18884a35953b0021ec265ce26
2017-07-06 16:09:49 +00:00
Lorenzo Colitti
97eec7adbb Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev
am: d2eef601f6

Change-Id: Ibc89ffd87fb87cd95f941b2bbd67469d961cb13e
2017-07-06 16:09:30 +00:00
Joel Scherpelz
0e42c8a0ab Wakeup packet mark/mask configuration option
Rules will only be installed if a device specific config.xml overrides
the default values of mark and mask.

This change also fixes a bug where wakeup rules added by the wakeup
controller would never be removed because updateInterfaces() is not
invoked on wifi network change or disable.

Test: as follows
    - built
    - flashed
    - booted
    - Manually verified that mask/mark is set correctly
Bug: 28806131

(cherry picked from commit 668370b9a5d36511f8f2cd58d6c6b0fc1020ee2d)

Change-Id: I95e75b11b973707bcb428ea6498fbfd8e717b855
2017-07-06 19:10:33 +09:00
Hugo Benichi
50b3fad094 Merge "ConnectivityManager: allow usage of TYPE_NONE" am: d54a27d898 am: 93e1941b43 am: 0278aa4b70
am: 3d2b4e04f3

Change-Id: I1e005686a1de5f2154fbc614ea52ce1a3ff5fc81
2017-07-05 14:54:05 +00:00
Hugo Benichi
3d2b4e04f3 Merge "ConnectivityManager: allow usage of TYPE_NONE" am: d54a27d898 am: 93e1941b43
am: 0278aa4b70

Change-Id: I1707e39308b0cf425b75e1e3f85323743c252c2f
2017-07-05 14:47:56 +00:00
Hugo Benichi
2a8b986cb7 Merge "ConnectivityServiceTest: more informative assert failures" am: cc1feacd8d am: a64e822036 am: 14f400ca81
am: 5c84e3b690

Change-Id: Icafd27e8273aa6b6595c30affd23a960e5d55c53
2017-07-05 14:40:30 +00:00
Hugo Benichi
93e1941b43 Merge "ConnectivityManager: allow usage of TYPE_NONE"
am: d54a27d898

Change-Id: I72dbd17db63bd7b8637e82f5cdcfec3bf1482962
2017-07-05 14:33:35 +00:00
Hugo Benichi
5c84e3b690 Merge "ConnectivityServiceTest: more informative assert failures" am: cc1feacd8d am: a64e822036
am: 14f400ca81

Change-Id: If00f0fd750d54074c0c642465384446502c1deec
2017-07-05 14:33:34 +00:00
Treehugger Robot
d54a27d898 Merge "ConnectivityManager: allow usage of TYPE_NONE" 2017-07-05 14:21:35 +00:00
Hugo Benichi
a64e822036 Merge "ConnectivityServiceTest: more informative assert failures"
am: cc1feacd8d

Change-Id: Iaa55014ae4c2f4927059735c349c40ada836b79b
2017-07-05 14:19:33 +00:00
Treehugger Robot
cc1feacd8d Merge "ConnectivityServiceTest: more informative assert failures" 2017-07-05 14:07:37 +00:00
Hugo Benichi
b92c1346cd Merge "ConnectivityServiceTest: eliminate remaining sleep()" am: 2af7cbd8b7 am: c521380789 am: 80bc56bf2a
am: 9ca9374aff

Change-Id: I9b1c77bd8d0710736f1f29b204acc3a162e833fb
2017-07-05 12:56:08 +00:00
Hugo Benichi
9ca9374aff Merge "ConnectivityServiceTest: eliminate remaining sleep()" am: 2af7cbd8b7 am: c521380789
am: 80bc56bf2a

Change-Id: I5e33e909cd8887460c2641c069432ec6bfa5beda
2017-07-05 12:49:04 +00:00
Hugo Benichi
c521380789 Merge "ConnectivityServiceTest: eliminate remaining sleep()"
am: 2af7cbd8b7

Change-Id: Ib1e31c2b8999d07b20ef4cef8e70d851f93df6e5
2017-07-05 12:35:01 +00:00