Commit Graph

6360 Commits

Author SHA1 Message Date
Maciej Żenczykowski
d94c963551 replace R + 1 with S
Test: TreeHugger
Bug: 170424293
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic28aa1a568bbd0b6d4f06abb7294415afd695fff
2021-11-10 18:16:42 -08:00
Les Lee
f9520f6d7d Fix normalize doesn't work on carrier template
From android 12, the subscriberId is being used for different network
types. For instances:
The TYPE_WIFI with subscriberId means that it is a merged wifi network.
The TYPE_CARRIER means that the network associate to specific carrier
network (subscriberId).

So remove the check "isMatchRuleMobile" and only check whether subscriberId
is being used in NetworkTemplate or not.

Bug: 194939211
Test: atest -c NetworkTemplateTest
Change-Id: I80c9f887cf8b4714716d657da92ed273a532ce27
2021-11-04 14:12:09 +08:00
Nagendra Prasad Nagarle Basavaraju
839597dea5 Merge "Support encoding/decoding IkeSessionParams with IKE_OPTION_INITIAL_CONTACT" 2021-11-01 23:55:56 +00:00
Nagendra Prasad Nagarle Basavaraju
3afaa9e51a Support encoding/decoding IkeSessionParams with
IKE_OPTION_INITIAL_CONTACT

This commit updates IkeSessionParamsUtils to be able
to encode/decode IkeSessionParams with IKE_OPTION_INITIAL_CONTACT
to/from a PersistableBundle

If this option is set for an IKE Session, The
INITIAL CONTACT  message is sent to the peer
to ensure that old security associations (SAs)
on the peer are deleted.

Bug: 186179788
Test: atest FrameworksIkeTests
Change-Id: I4ecd36ae222d95a84e8e6897a219f8accb9ed83b
2021-10-29 03:03:51 +00:00
Aaron Huang
94d684fb9c Adapt NET_CAPABILITY_TEMPORARILY_NOT_METERED in NetworkIdentity
NET_CAPABILITY_TEMPORARILY_NOT_METERED is a capability indicates
networks are generally metered, but are currently unmetered.
NetworkIdentity currently did not consider it which will cause
Settings shows high data usage. To exclude unmetered 5g from the
metered usage, NetworkIdentity should consider a network with
NET_CAPABILITY_TEMPORARILY_NOT_METERED capabilities as not metered.

Bug: 183776809
Test: FrameworksNetTests:NetworkIdentityTest
Change-Id: Iadbc082b52f16708207e8aecf0904356bc0898ab
2021-10-26 05:57:24 +00:00
Aaron Huang
4f3a425346 Have buildTemplateMobileWithRatType take metered parameter
To support unmetered 5g, have buildTemplateMobileWithRatType take
metered parameter to build a template which could be used to filter
an unmetered network.

Bug: 183776809
Test: atest FrameworksNetTests:NetworkStatsServiceTest
Change-Id: Ia310d90eceeb572a35ce9518de02b198cae16705
Merged-In: Ia310d90eceeb572a35ce9518de02b198cae16705
2021-10-25 15:10:15 +00:00
Aaron Huang
d951da2203 Respect metered filter in matchesMobile*
In old design, only metered mobile network would be matched,
which means that only metered stats could be read if callers
query the mobile stats.

Currently, the caller in NetworkPolicyManagerService was updated
to use the NetworkTemplate constructor with metered parameter in
aosp/1563312 which means that the template will be created by a
given meteredness. Thus, the hardcode metered can be removed.

Remove the metered check from matches method will cause a
different behavior. Therefore, to keep the original behavior,
if the match rule is MATCH_MOBILE or MATCH_MOBILE_WILDCARD,
it should pass METERED_YES to the constructor to build a
metered template.

Also, if a caller creates a template by calling the constructor
with metered as a parameter, the behavior will also be changed.
Therefore, if the caller expects to get metered stats then it
should change to pass METERED_YES. If the caller expects to get
both metered and unmetered stats then it should remain METERED_ALL
and it would be a bug that been fixed by this patch.

Bug: 183776809
Bug: 202092687
Test: atest FrameworksNetTests:NetworkStatsServiceTest
      manually test by generating traffic and check the data counts
      from "adb shell dumpsys netstats --uid" almost equal to the
      result from "adb shell cmd stats pull-source 10082"
Change-Id: I66dd51b020f6d895cd002acc05bef6b6315cd447
Merged-In: I66dd51b020f6d895cd002acc05bef6b6315cd447
2021-10-25 15:09:21 +00:00
Neil Fuller
5b274f5eef Merge "Add android.net tests to postsubmit" 2021-10-20 09:48:52 +00:00
Neil Fuller
a0db5578fc Fix error prone warnings
Fix warnings introduced by previous commits and add @RunWith annotation
to new tests for consistency with existing tests.

Bug: 199481251
Test: Treehugger only
Change-Id: Iaec4caa80b15112bce84268adc6d763198f0ff61
2021-10-19 18:45:14 +01:00
Neil Fuller
c9bbe6b59e Fix SntpClient 2036 issue (2/2)
Fix issue with SntpClient after the end of NTP era 0 (2036).

This is the second of two commits. This commit makes the actual fixes
and makes tests pass.

Before this change SntpClient converted to Unix epoch times too eagerly.
NTP 64-bit timestamps are lossy: they only hold the number of seconds /
factions of seconds in the NTP era and the era is not transmitted. The
existing code assumed the era was always era 0, which ends in 2036.

As explained at https://www.eecis.udel.edu/~mills/y2k.html,
the lossiness of the type is not an issue providing that the maths is
implemented carefully: the NTP timestamps are only ever subtracted from
each other, are always assumed to be in the same or adjacent NTP eras,
and are used to calculate offsets that are applied to client Unix epoch
times.

This commit:

+ Switches to use a dedicated Timestamp64 type, avoiding the use
of the Unix epoch.
+ Switches to use a dedicated Duration64 type for holding the
32-bit signed difference between two Timestamp64 instances.
+ Simplifies the readTimeStamp() and writeTimeStamp() methods.
+ Adds missing validation covered by a TODO. The code was randomizing
the lower bits of the client transmit timestamp, but then not checking
the result as it should, presumably because it was difficult to know
what value was sent. Easily fixed with a dedicated type.
+ Stops randomizing the lower bits of various other timestamps
unnecessarily.
+ Fixes some naming to add clarity.

Bug: 199481251
Test: atest core/tests/coretests/src/android/net/sntp/Timestamp64Test.java
Test: atest core/tests/coretests/src/android/net/sntp/Duration64Test.java
Test: atest core/tests/coretests/src/android/net/SntpClientTest.java
Merged-In: I6d3584f318b0ef6ceab42bb88f20c73b0ad006cb
Change-Id: I6d3584f318b0ef6ceab42bb88f20c73b0ad006cb
2021-10-19 18:22:43 +01:00
Neil Fuller
f663ab4276 Fix SntpClient 2036 issue (1/2)
Fix issue with SntpClient after the end of NTP era 0 (2036).

This commit is 1/2. It makes some refactoring changes, lint fixes, adds
tests and introduces types that will be used in 2/2. Some of the added
tests fail and demonstrate the issue being fixed with the current
implementation.

-----

Failures that demonstrate the bug:

android.net.SntpClientTest#testRequestTime_era1ClientEra1Server

STACKTRACE:
junit.framework.AssertionFailedError: expected=5, actual=-4294967295995, allowedSlop=1
	at junit.framework.Assert.fail(Assert.java:50)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at android.net.SntpClientTest.assertNearlyEquals(SntpClientTest.java:502)
	at android.net.SntpClientTest.checkRequestTimeCalcs(SntpClientTest.java:215)
	at android.net.SntpClientTest.testRequestTime_era1ClientEra1Server(SntpClientTest.java:201)

android.net.SntpClientTest#testRequestTime_era0ClientEra1Server: FAILED (145ms)

STACKTRACE:
junit.framework.AssertionFailedError: expected=1139293696005, actual=-3155673599995, allowedSlop=1
	at junit.framework.Assert.fail(Assert.java:50)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at android.net.SntpClientTest.assertNearlyEquals(SntpClientTest.java:502)
	at android.net.SntpClientTest.checkRequestTimeCalcs(SntpClientTest.java:215)
	at android.net.SntpClientTest.testRequestTime_era0ClientEra1Server(SntpClientTest.java:174)

android.net.SntpClientTest#testNonMatchingOriginateTime: FAILED (116ms)

STACKTRACE:
junit.framework.AssertionFailedError
	at junit.framework.Assert.fail(Assert.java:48)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at junit.framework.Assert.assertFalse(Assert.java:34)
	at junit.framework.Assert.assertFalse(Assert.java:41)
	at android.net.SntpClientTest.testNonMatchingOriginateTime(SntpClientTest.java:384)

------

This commit:

+ Introduces a dedicated Timestamp64 type + test for holding NTP
timestamps.
+ Introduces a dedicated Duration64 type + test for holding the
32-bit signed difference between two Timestamp64 instances.
+ Fixes some naming to add clarity / addresses lint issues.
+ Adjusts tests

Tests are NOT expected to pass with just this commit. See 2/2.

Bug: 199481251
Test: atest core/tests/coretests/src/android/net/sntp/Timestamp64Test.java
Test: atest core/tests/coretests/src/android/net/sntp/Duration64Test.java
Test: atest core/tests/coretests/src/android/net/SntpClientTest.java
Merged-In: Ifdaada39298b05c48a3207fe6c0fad71c8a0a252
Change-Id: Ifdaada39298b05c48a3207fe6c0fad71c8a0a252
2021-10-19 18:22:16 +01:00
Neil Fuller
563ecfccb1 Add android.net tests to postsubmit
Add android.net tests to postsubmit. The tests / annotations will
be added in a separate commit.

Bug: 199481251
Test: Treehugger / inspection
Change-Id: I17cb464979535c767bbb8ee22fd7456ff08bae6c
2021-10-19 15:57:01 +01:00
Neil Fuller
3725e9c638 Attempt 2 for adding OWNERS for SNTP code
Commit e5ad129716 combined with pending
reviews demonstrated the OWNERS syntax has quirks and it is not working
as intended.

Documentation used:
https://android-review.googlesource.com/plugins/code-owners/Documentation/backend-find-owners.html#syntax

The syntax guide recommends that patterns like sub-dir/* aren't used as
they can cause problems when renaming directories; better to have OWNERS
in the sub-dir. The pattern sntp/* didn't appear to be working (perhaps
because of spaces).

Test: None
Bug: 199481251
Change-Id: I193744eaaad529b9680d3ccf905b86d68f62f7ff
2021-10-14 13:28:57 +01:00
Neil Fuller
e5ad129716 Add additional OWNERS for SNTP client code
Add additional OWNERS for SNTP client code.  This may be enough to cover
test code that will match the same patterns in
core/tests/coretests/src/android/net (which imports/includes
core/java/android/net/OWNERS). If not, there will be a follow-up for
test code.

Test: None
Bug: 199481251
Change-Id: I1dd6ce6afa0cb441279f3fad3e82483ce6dcaf1b
2021-10-14 09:35:58 +01:00
Aaron Huang
b8b78051eb Merge "Remove forceAllNetworkTypes from test" am: bc48cdaf46
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824613

Change-Id: I460b93a1a9d04ecdf687761eea3461ecf0346860
2021-09-17 12:25:04 +00:00
Aaron Huang
8216831b36 Remove forceAllNetworkTypes from test
A test should test the actual behavior as much as possible.
However, if the flag is true, matchesMobile/matchesMobileWildcard
will always return true regardless of the network type and metered.
Thus, remove this flag would be closer to the actual behavior.

Bug: 183776809
Test: atest FrameworksNetTests
Change-Id: I0907a08ca1dd8a14a738db4057ea5ff6a0cd925a
2021-09-15 18:30:09 +08:00
Treehugger Robot
d6b4b6dc69 Merge "Correct comments" am: 2c0b1b672e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1784149

Change-Id: I3bc94fb7cbc33dc32bb4b0adf5282814bac75232
2021-08-25 07:17:26 +00:00
Treehugger Robot
2c0b1b672e Merge "Correct comments" 2021-08-25 07:04:22 +00:00
Yen-Jen Wang
68d79b074c Correct comments
PacProxyInstaller had been renamed to PacProxyService
so any comments that refer to it should be updated
accordingly.

Bug: 194984075
Test: refine comments only
Change-Id: I5d8ed07e804471cfcbcc80eca908b18f6557cf79
2021-08-03 19:41:14 +08:00
lucaslin
3eb2a54e31 Throw UnsupportedOperationException if startLegacyVpn is called
Legacy VPN is deprecated starting from Android S. So this API
shouldn't be called if the initial SDK version of device is
Android S+. Otherwise, UnsupportedOperationException will be
thrown.

Bug: 189808606
Test: 1. make gts && gts-tradefed
      2. run gts --module GtsNetworkStackHostTestCases
Change-Id: I00f49555bbbc8ccf270056f0e4d1bfdd927ef26d
Merged-In: I00f49555bbbc8ccf270056f0e4d1bfdd927ef26d
2021-07-30 14:15:38 +08:00
Luke Huang
6bb1bf8f2c Merge "Keep the native mdns daemon alive for pre-S application" into sc-dev am: 5978eb6eb4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15320524

Change-Id: I18b5ab0a0d332167db75d97b8d35595dedc56567
2021-07-22 03:26:43 +00:00
Luke Huang
4593d929fe Keep the native mdns daemon alive for pre-S application
Roll back the behavior changes by checking the target SDK to ensure that
there are no compatibility issues with the pre-S application.
If the target SDK of the application <S, NsdManager will actively send a
cmd to start the native daemon, and NsdService will keep the daemon
until the last client with the target SDK <S disconnects.

Test: atest NsdManagerTest NsdServiceTest
Bug: 191844585
Change-Id: Ie93d5d585e126fe220ae865bbc7274f21a925984
2021-07-21 06:21:42 +00:00
Treehugger Robot
f305d79b2f Merge "Gracefully handle integer overflows." am: edbf08efe4 am: d4909b9aa9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1714119

Change-Id: I95ef9e71987fc39250e6edd107fe2ec597b1ea17
2021-07-20 08:15:13 +00:00
Treehugger Robot
edbf08efe4 Merge "Gracefully handle integer overflows." 2021-07-20 07:36:56 +00:00
Remi NGUYEN VAN
8608d0626e Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" 2021-07-19 09:47:21 +00:00
Chalard Jean
452aed7c25 Merge "Add doc explaining PAC proxies are not supported over VPNs" am: 2f3d6bc593 am: 75e9f0806c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1767430

Change-Id: Ia763ff8a6ddcbaf86f0dc8220a75819bb2e44858
2021-07-15 09:33:47 +00:00
Chalard Jean
3eac2ebe4d Add doc explaining PAC proxies are not supported over VPNs
Test: Comment-only change
Bug: 181600172
Change-Id: I3049fa7eafed04858711f8dee0c11dd4656f9106
2021-07-15 13:45:51 +09:00
paulhu
670abcd53d Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.

Bug: 184735771
Test: m
Merged-In: I72660959cb4e638a8e80fcf2f4e96ea172969f44
(cherry-pick with minor conflicts)

Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
2021-07-05 14:10:16 +09:00
Benedict Wong
a49bbf06f1 Add support for app data accounting for in-kernel dataplanes
This change ensures that app data accounting works correctly within the
confines of in-kernel dataplanes, as used by platform VPNs and the VCN.

Notably, the VCN MUST NOT specify the IMSI, as that would lead to double
counting of the interface statistics.

Bug: 175853498
Bug: 190620024
Test: atest NetworkStatsTest FrameworksVcnTests
Original-Change: https://android-review.googlesource.com/1749070
Merged-In: I768907cd3dd2028c7040cddd81fc71a5ce69bbdb
Change-Id: I768907cd3dd2028c7040cddd81fc71a5ce69bbdb
2021-07-02 19:28:45 +00:00
Benedict Wong
9c66126e95 Merge "Add support for app data accounting for in-kernel dataplanes" am: 69e2f04207 am: cdb9503af4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1749070

Change-Id: I583a872bcb18f1b749f4ab0b49cbc9323920f048
2021-07-02 19:12:24 +00:00
Benedict Wong
69e2f04207 Merge "Add support for app data accounting for in-kernel dataplanes" 2021-07-02 18:42:15 +00:00
Benedict Wong
bbee1d39b1 Add support for app data accounting for in-kernel dataplanes
This change ensures that app data accounting works correctly within the
confines of in-kernel dataplanes, as used by platform VPNs and the VCN.

Notably, the VCN MUST NOT specify the IMSI, as that would lead to double
counting of the interface statistics.

Bug: 175853498
Bug: 190620024
Test: atest NetworkStatsTest FrameworksVcnTests
Change-Id: I768907cd3dd2028c7040cddd81fc71a5ce69bbdb
2021-07-01 19:49:50 -07:00
Yan Yan
bfeb5980f2 Include IkeTunnelConnectionParams in #hashCode and #equals
This commit includes IkeTunnelConnectionParams in
VcnGatewayConnectionConfig#hashCode and
VcnGatewayConnectionConfig#equals.

This commit fixes the issue that VcnGatewayConnection was not
being restarted as expected.

Bug: 191317512
Test: atest FrameworksVcnTests (new tests added)
Test: atest CtsVcnTestCases
Original-Change: https://android-review.googlesource.com/1742657
Merged-In: I70182f9b645e55eced1e0a048a1bd87778c1c0f6
Change-Id: I70182f9b645e55eced1e0a048a1bd87778c1c0f6
2021-06-23 23:38:16 +00:00
Lucas Lin
da2e1eb4d4 Merge "Throw UnsupportedOperationException if startLegacyVpn is called" into sc-dev am: 3d46c08205
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15047372

Change-Id: Ibaba54fc37e9e0d33504b2901484e3551afeb005
2021-06-23 05:38:24 +00:00
Yan Yan
627f34fab2 Merge "Include IkeTunnelConnectionParams in #hashCode and #equals" am: 320056b32d am: 8d9fa0b9e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1742657

Change-Id: I061ad3d218a460a7f859fe442b1111f3432ae28c
2021-06-23 02:18:09 +00:00
lucaslin
d4c4a2c95b Throw UnsupportedOperationException if startLegacyVpn is called
Legacy VPN is deprecated starting from Android S. So this API
shouldn't be called if the initial SDK version of device is
Android S+. Otherwise, UnsupportedOperationException will be
thrown.

Bug: 189808606
Test: 1. make gts && gts-tradefed
      2. run gts --module GtsNetworkStackHostTestCases
Change-Id: I00f49555bbbc8ccf270056f0e4d1bfdd927ef26d
2021-06-23 08:17:55 +08:00
Yan Yan
320056b32d Merge "Include IkeTunnelConnectionParams in #hashCode and #equals" 2021-06-22 22:41:03 +00:00
Yan Yan
16006a61b9 Include IkeTunnelConnectionParams in #hashCode and #equals
This commit includes IkeTunnelConnectionParams in
VcnGatewayConnectionConfig#hashCode and
VcnGatewayConnectionConfig#equals.

This commit fixes the issue that VcnGatewayConnection was not
being restarted as expected.

Bug: 191317512
Test: atest FrameworksVcnTests (new tests added)
Test: atest CtsVcnTestCases
Change-Id: I70182f9b645e55eced1e0a048a1bd87778c1c0f6
2021-06-22 11:37:38 -07:00
Treehugger Robot
e98c98156c Merge "Convert VcnNetworkProvider to use NetworkOffers" 2021-06-16 19:48:58 +00:00
Cody Kesting
705021aa6b Convert VcnNetworkProvider to use NetworkOffers
This change brings VcnNetworkProvider to full functionality in the new
NetworkProvider paradigm, where NetworkProviders offer networks, and are
notified based on NetworkOfferCallbacks.

Bug: 185204197
Test: atest FrameworksVcnTests
Change-Id: I88c69c0be9f6fd81839fb1595ed00341001694a5
Merged-In: I88c69c0be9f6fd81839fb1595ed00341001694a5
2021-06-15 18:13:56 -07:00
Sarah Chin
ab9f5d46b2 Merge "Update documentation for setSubscriptionOverride" 2021-06-14 19:30:48 +00:00
Luke Huang
171d69e33e Make NsdService only start the native daemon when needed and automatically clean it up.
Currently, NsdService starts the native mdnsresponder daemon if any
NsdManager connect to it, which results in that when any constant
service holds the NsdManager connection, the device would always be
in the mdns multicast group whatever the connection is not used or not.
This is because mdnsresponder will join the multicast group when it
starts.

To solve this problem, start the native daemon only when needed, and
clean it up after the given idle timeout.

1. Start the native daemon when a new request come.
2. If there is no pending request, clean up the daemon after 3 seconds
of idle time.

Bug: 181810560
Test: atest NsdManagerTest NsdServiceTest
Original-Change: https://android-review.googlesource.com/1717479
Merged-In: I3eb04552f6cf6c0c68c07abffe751bb4d0669215
Change-Id: I3eb04552f6cf6c0c68c07abffe751bb4d0669215
2021-06-14 06:54:52 +00:00
Luke Huang
83703e20c1 Merge "Make NsdService only start the native daemon when needed and automatically clean it up." am: 05081aa3b0 am: 109327feb0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1717479

Change-Id: Idb9e8dcd7c38ee09e21a3e0af3e643c44f9aa357
2021-06-13 16:52:05 +00:00
Luke Huang
b4cbf81dd7 Make NsdService only start the native daemon when needed and automatically clean it up.
Currently, NsdService starts the native mdnsresponder daemon if any
NsdManager connect to it, which results in that when any constant
service holds the NsdManager connection, the device would always be
in the mdns multicast group whatever the connection is not used or not.
This is because mdnsresponder will join the multicast group when it
starts.

To solve this problem, start the native daemon only when needed, and
clean it up after the given idle timeout.

1. Start the native daemon when a new request come.
2. If there is no pending request, clean up the daemon after 3 seconds
of idle time.

Bug: 181810560
Test: atest NsdManagerTest NsdServiceTest
Change-Id: I3eb04552f6cf6c0c68c07abffe751bb4d0669215
2021-06-08 10:09:30 +08:00
Benedict Wong
c52419c68a Merge "Remove underlying network caps" into sc-dev 2021-06-07 17:24:45 +00:00
Sarah Chin
2aaa2c3205 Update documentation for setSubscriptionOverride
Test: build
Fix: 180496714
Change-Id: Iebfcd0ece1891c1b77d132b92e93d8c1eea3aa6e
Merged-In: Iebfcd0ece1891c1b77d132b92e93d8c1eea3aa6e
2021-06-03 17:40:53 -07:00
lesl
c23f868643 carrier data usage: Use carrier template as default policy am: b8b282e54e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14782679

Change-Id: I8bdde6aaeea04c4c70a37d5a71ad31a5590323a9
2021-06-02 04:01:14 +00:00
Les Lee
9eb7688535 Merge "carrier data usage: Use carrier template as default policy" 2021-06-01 10:42:08 +00:00
lesl
b8b282e54e carrier data usage: Use carrier template as default policy
The carrier network means any network which linked with sepcific
subscriberId (for instances: merged Wifi or mobile).
Update default policy to use carrier network template to replace mobile
template.

No impact for current AOSP user because no any wifi network is merged
wifi. (Because the merged wifi network requires to support from the wifi module).

Also this change convert all of the old policies which template is
TYEP_MOBILE to TYPE_CARRIER to match the default policy.

Bug: 176396812
Test: atest -c NetworkPolicyManagerServiceTest
Test: atest -c CtsHostsideNetworkTests
Test: Manual Test with test code (Force wifi to merged wifi).
      The data will limit when using merged wifi.
      And mobile policy also work normally.

Merged-In: I33c10f7549e713c52ce9afd5b8c4cce2abbda616
Change-Id: I33c10f7549e713c52ce9afd5b8c4cce2abbda616
2021-06-01 18:12:56 +08:00
Aaron Huang
b0409be590 Merge "Remove IntDef annotations from NetworkPolicyManager" into sc-dev am: 2debdb3ec2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14747451

Change-Id: Ibd18e3a01ebc46cf27494d99d95e85ef74762f9c
2021-06-01 08:20:24 +00:00