Commit Graph

8859 Commits

Author SHA1 Message Date
Lucas Lin
b173efe01a [automerger skipped] Merge "Remove sendNetworkConditionsBroadcast" into rvc-dev am: 542d796a9f -s ours
am skip reason: Merged-In I7b43940dc32826c70fa82f471b35bc5cb8394aad with SHA-1 792f554dc9 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14455604

Change-Id: I977a5bdbf0c320a83075a17208abb68aab52ff2d
2021-05-12 17:22:58 +00:00
lucaslin
266d39b4cb Remove sendNetworkConditionsBroadcast
sendNetworkConditionsBroadcast is removed, so
TestNetworkStackService.kt cannot override it anymore,
otherwise there will be a build break when running this
test.
Also add a comment for NETWORK_CONDITIONS_MEASURED in
AndroidManifest.xml.

Bug: 175213041
Test: atest FrameworksNetIntegrationTests
Change-Id: I7b43940dc32826c70fa82f471b35bc5cb8394aad
Merged-In: I7b43940dc32826c70fa82f471b35bc5cb8394aad
2021-05-11 01:12:56 +00:00
lucaslin
792f554dc9 Remove sendNetworkConditionsBroadcast
sendNetworkConditionsBroadcast is removed, so
TestNetworkStackService.kt cannot override it anymore,
otherwise there will be a build break when running this
test.
Also add a comment for NETWORK_CONDITIONS_MEASURED in
AndroidManifest.xml.

Bug: 175213041
Test: atest FrameworksNetIntegrationTests
Change-Id: I7b43940dc32826c70fa82f471b35bc5cb8394aad
2021-04-22 10:05:50 +00:00
TreeHugger Robot
f80adf07e2 Merge changes I6ec246a6,If7eb8857,Id3d12b23,Ia52f9caf,I21028457, ... into rvc-dev am: 65eb4a4332
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425320

Change-Id: Id5810e50b56389fe53f739f84ad79d8ef878e4f6
2021-03-17 09:15:05 +00:00
Lorenzo Colitti
ee04333c71 Backport test coverage from aosp/1547496. am: ee5ed04cbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425319

Change-Id: I559be41c77cc6348e745324ab675c603b1f3ad1d
2021-03-17 09:15:02 +00:00
Lorenzo Colitti
646fa39db0 Backport some helpers in ConnectivityServiceTest. am: 853504c524
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425318

Change-Id: I7ffa0faf61ccc7238b65e0f9ed863939e5089f06
2021-03-17 09:14:59 +00:00
Lorenzo Colitti
402c1815e7 Test for bugs with suspended VPN underlying networks. am: 157af6c6d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425317

Change-Id: I28f2b0f682d8ee2982b8669267efe43ae0805778
2021-03-17 09:14:57 +00:00
Lorenzo Colitti
fee813bd91 Add a test for getDefaultNetworkCapabilitiesForUser. am: 6f7a5df35a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425316

Change-Id: Ic3b3584c25a0703aa273b47d042b2b339f1de2e7
2021-03-17 09:14:54 +00:00
Lorenzo Colitti
179f9147a6 Improve testing of CONNECTIVITY_ACTION broadcasts. am: 69a61d921b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425315

Change-Id: I889026eec095745be2e88f0c38392619c8ae6cfd
2021-03-17 09:14:49 +00:00
Lorenzo Colitti
357f4e82cd Test passing an underlying network array with null network in it. am: b85a606d49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425314

Change-Id: I7c78a186187db9c77c8980b670f802f9fd2e42ce
2021-03-17 09:14:46 +00:00
Lorenzo Colitti
75657895d9 Make testVpnNetworkActive more deterministic. am: abc306b5e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425313

Change-Id: I5b7901958bf96b0cee80c6124e004e57da0992cd
2021-03-17 09:14:44 +00:00
Lorenzo Colitti
753242551f Make MockVpn more realistic and easier to use. am: 02e6be7824
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425312

Change-Id: I0e1ff975206ed180744c4c7a6f42e00b95589424
2021-03-17 09:14:41 +00:00
Lorenzo Colitti
5a339b5231 Increase test coverage for VPN info sent to NetworkStatsService. am: f0932b894a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425311

Change-Id: Ibea98977b36f0e9a71d47f0ec3fe4926516842f7
2021-03-17 09:14:38 +00:00
Lorenzo Colitti
03cff31e16 Simplify MockVpn. am: 4b615c01e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425310

Change-Id: Iff91a12ced969b34ba28b792e476c945eecdb817
2021-03-17 09:14:36 +00:00
Lorenzo Colitti
9dfd379583 Test a VPN with an underlying network that does not yet exist. am: b32463cc53
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425309

Change-Id: Iac0a5305600fc70e05de90e4552258a0225d7f94
2021-03-17 09:14:32 +00:00
Lorenzo Colitti
cbaf93951c Fix legacy APIs when VPN switches to suspended underlying network.
Currently, when the VPN underlying network changes from a
network that is not suspended to one that is suspended (or vice
versa), some of the legacy APIs return incorrect results.

This is because the VPN's NetworkInfo can get into SUSPENDED
state even though the capabilities have the NOT_SUSPENDED
capability. This happens because the code in updateCapabilities
that checks for changes in NOT_SUSPENDED and NOT_ROAMING (which
are the capabilities that can affect the NetworkInfo state) is
only run when the capabilities change in a certain way.

Fix this by always checking for changes in these capabilities,
regardless of what else has changed.

This results in sending a lot more SUSPENDED and RESUMED
callbacks than the code sent previously. This should hopefully
not impact apps because those callback methods have never been
public API, though because they're just callbacks, it's possible
that apps found out via code inspection that the callbacks
existed and implemented them.

Bug: 172870110
Test: changes to existing tests in ConnectivityServiceTest
Change-Id: I6ec246a6a4e61f634956a165797fbb80296efd6a
Merged-In: I6ec246a6a4e61f634956a165797fbb80296efd6a
2021-01-28 19:44:00 +09:00
Lorenzo Colitti
ee5ed04cbf Backport test coverage from aosp/1547496.
This test coverage is necessary to fix an upcoming bug in R.
Backport it from the change that added it. The non-test portion
of that change is not necessary in R because it fixes a
bug that was introduced in S.

Bug: 172870110
Test: accompanying unit test shows lots of bugs removed
Change-Id: If7eb8857474d8b4f774f5fa5db2a3112e85c9cae
Merged-In: Ibf376a6fa4b34d1c96f8506fa8abbb7595a8c272
2021-01-28 19:44:00 +09:00
Lorenzo Colitti
853504c524 Backport some helpers in ConnectivityServiceTest.
These were added in aosp/1527378, which is impractical to
backport.

Bug: 172870110
Test: test-only change
Change-Id: Id3d12b23034b284c8f7dffb5167244e1e43987e2
Merged-In: I827543751dbf5e626a24ec02cd6f50b423f5f761
2021-01-28 19:44:00 +09:00
Lorenzo Colitti
157af6c6d3 Test for bugs with suspended VPN underlying networks.
Bug: 172870110
Test: atest --rerun-until-failure 100 ConnectivityServiceTest#testVpnSwitchFromSuspendedToNonSuspended
Change-Id: Ia52f9cafef3f49ae70ad135d017e207eb57fddfe
Merged-In: Ia52f9cafef3f49ae70ad135d017e207eb57fddfe
2021-01-28 19:44:00 +09:00
Lorenzo Colitti
6f7a5df35a Add a test for getDefaultNetworkCapabilitiesForUser.
Bug: 172870110
Test: test-only change
Test: new test passes 100 times in a row
Change-Id: I210284578e38cd25b8b95235d3390d5bd66a5a70
Merged-In: I210284578e38cd25b8b95235d3390d5bd66a5a70
2021-01-28 19:43:59 +09:00
Lorenzo Colitti
69a61d921b Improve testing of CONNECTIVITY_ACTION broadcasts.
We currently test CONNECTIVITY_ACTION broadcasts by directly
registering BroadcastReceivers with BroadcastInterceptingContext,
and making the receivers unregister themselves when all the
broadcasts they expect have been received.

This works for current test cases, but does not work if anything
registers another receiver for CONNECTIVITY_ACTION. In that case,
when we unregister the receiver in the receiver's onReceive
method, BroadcastInterceptingContext will throw a
ConcurrentModificationException because the list of receivers is
being modified during iteration.

Fix this by adding an ExpectedBroadcast class that stores the
receiver and unregisters the receiver only when the test checks
that the broadcast was received, which happens after the receiver
runs. This is easier to use and also guarantees that the receiver
is unregistered even if the test is expecting that the broadcast
is never fired. Accordingly, remove mRegisteredReceivers and the
code that uses it; it's no longer necessary now that
ExpectedBroadcast always unregisters its receivers.

Also add a convenience expectConnectivityAction method to expect
a CONNECTIVITY_ACTION broadcast with specific contents. This
makes the test easier to read and more detailed. Convert some
existing tests to this method.

While I'm at it, fix a test that was using "mCellNetworkAgent" to
represent a wifi network.

R backport notes: added import for NetworkInfo.DetailedState.
That was added in aosp/1527378, which is impractical to backport.

Bug: 172870110
Test: test-only change
Change-Id: Ibada8b4215625e1016d9fd170526206920af76f5
Merged-In: Ibada8b4215625e1016d9fd170526206920af76f5
2021-01-28 19:43:59 +09:00
Lorenzo Colitti
b85a606d49 Test passing an underlying network array with null network in it.
Current code treats these nulls as if they weren't there.

Bug: 172870110
Test: test-only change
Change-Id: Id4632e1b004c09910b4b7613f7233d2c19e2f0ac
Merged-In: Id4632e1b004c09910b4b7613f7233d2c19e2f0ac
2021-01-28 19:43:59 +09:00
Lorenzo Colitti
abc306b5e9 Make testVpnNetworkActive more deterministic.
This test is a bit brittle because it sets the underlying
networks while the VPN is undergoing validation by
NetworkMonitor. The test does attempt to disable validation,
but that's not actually possible - the only thing that's possible
is to tell NetworkMonitor to validate immediately without sending
any probes. So the underlying network change races with the
validation. I'm not sure why the test isn't flaky. It might be
because both the network change and the validation result in a
capabilities change, and the test expects "a capabilities change"
without expressing what change that should be.

Make this a bit more predictable by ensuring that the network
validates before the underlying networks are set.

This is useful because an upcoming CL will change the way
underlying network capabilities are propagated. With this test
CL, both the old and the new code pass.

Bug: 172870110
Test: test-only change
Change-Id: I319858228e8d097c0b60a107029f296385f91269
Merged-In: I319858228e8d097c0b60a107029f296385f91269
2021-01-28 19:43:59 +09:00
Lorenzo Colitti
02e6be7824 Make MockVpn more realistic and easier to use.
MockVpn is very difficult to use because it requires the test
caller keeping track of both the MockVpn object and an
accompanying TestNetworkAgentWrapper.

It's also not very realistic: for example, connect() doesn't
actually connect anything, it just makes it so that if
ConnectivityService tries to update the capabilities, the attempt
will not be ignored. Also, unlike the real code in Vpn, it
connects with empty NetworkCapabilities (in particular, with
empty UID ranges).

Make this easier to use and a bit more realistic by:
- Allowing TestNetworkAgentWrapper to take a "NetworkCapabilities
  template" that will form the initial capabilities sent when the
  agent registers with ConnectivityService. This allows the VPN
  to register its agent with its UID ranges already set, like the
  production code does.
- Providing separate methods to register the NetworkAgent and
  mark it connected for cases where the test needs to make
  changes to the NetworkAgent before connecting (e.g., poking
  NetworkMonitor).
- Putting the TestNetworkAgentWrapper inside MockVpn and driving
  it through MockVpn's methods. In order not to have too many
  wrapper functions (and because we can't delegate like in
  Kotlin), there's still an agent() method that returns the
  TestNetworkAgentWrapper.

Bug: 172870110
Test: test-only change
Change-Id: I749ff325bc13ac96f512270b86d1f67686eec378
Merged-In: I749ff325bc13ac96f512270b86d1f67686eec378
2021-01-28 19:43:59 +09:00
Lorenzo Colitti
f0932b894a Increase test coverage for VPN info sent to NetworkStatsService.
Bug: 172870110
Test: test-only change
Change-Id: I3711b362f31cb92b759e9f5c9d244fb88d9bd5e7
Merged-In: I3711b362f31cb92b759e9f5c9d244fb88d9bd5e7
2021-01-28 19:43:59 +09:00
Lorenzo Colitti
4b615c01e5 Simplify MockVpn.
This CL removes four methods in MockVpn by slightly changing the
test code to leverage the actual methods implemented by the
(production) Vpn superclass.

This works because setting mInterface results in
isRunningLocked() returning true, which makes a number of methods
behave as if the VPN is connected (which is what the test
expects).

The more realistic behaviour exposes a minor bug in the treatment
of underlying networks. Add a TODO to fix it.

Bug: 172870110
Test: test-only change
Change-Id: I49421183538ba61ca790af71e309ece36b653bf9
Merged-In: I49421183538ba61ca790af71e309ece36b653bf9
2021-01-28 19:43:58 +09:00
Lorenzo Colitti
b32463cc53 Test a VPN with an underlying network that does not yet exist.
This test checks that if a VPN declares an underlying network
that does not exist, the capabilities of that network are applied
to the VPN as soon as the network starts to exist.

Bug: 172870110
Test: test-only change
Change-Id: Icc0701cb4cea7d91f7738c1e426e94cd26686b74
Merged-In: Icc0701cb4cea7d91f7738c1e426e94cd26686b74
2021-01-28 19:43:55 +09:00
Chalard Jean
30c0e47829 Merge "Move module utils to the module package." into mainline-prod 2020-12-11 02:07:48 +00:00
Lucas Lin
494c50af06 Ignore verifying canBeSatisfiedBy() on Android Q
The method - satisfiedBy() has changed to canBeSatisfiedBy()
starting from Android R, so the method - canBeSatisfiedBy()
cannot be found when running this test on Android Q.
Ignore verifying canBeSatisfiedBy() on Android Q to fix this
problem.

Bug: 173911834
Test: Run MatchAllNetworkSpecifierTest on Android Q, R, S.
Original-Change: https://android-review.googlesource.com/1508137
Merged-In: Ibe317b56f82d3ea100b1d78c3907dce4f2fd964d
Change-Id: Ibe317b56f82d3ea100b1d78c3907dce4f2fd964d
2020-11-26 07:34:54 +00:00
Chalard Jean
211c6da815 Move module utils to the module package.
Test: FrameworksWifiTest FrameworksNetTest
Change-Id: I067eeecd458c34b7f2fbfa439072682661ac750c
Merged-In: I067eeecd458c34b7f2fbfa439072682661ac750c
2020-11-25 06:01:49 +00:00
Lucas Lin
3e3bffbcdb Separate 2 tests to verify canBeSatisfiedBy()
In Android R, NetworkSpecifier#satisfiedBy() has changed to
NetworkSpecifier#canBeSatisfiedBy(), but its subclass -
MatchAllNetworkSpecifier hasn't.
In Android S, both of MatchAllNetworkSpecifier and
NetworkSpecifier has changed satisfiedBy() to canBeSatisfiedBy().
So if running the latest CTS on R device, it will verify
NetworkSpecifier#canBeSatisfiedBy() instead of
MatchAllNetworkSpecifier#satisfiedBy() and get the unexpected
result.
The fix is to separate 2 tests to verify canBeSatisfiedBy(), one
is for Android R or older version and the other is for Android
S+.

Bug: 172401624
Test: Run MatchAllNetworkSpecifierTest on Android R and S.

Change-Id: I9aeddaa3e331f609bbdba8ab0c2d6e014123f242
Merged-In: I1391bae9a0fc0298beb8fe80b5f388b492244566
2020-11-18 09:52:58 +00:00
Rambo Wang
e5d9cf4577 Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier
MatchAllNetworkSpecifier is a subclass of NetworkSpecifer. The method
satisfiedBy should be renamed to canBeSatisfiedBy together with other
subclass of NetworkSpecifer in b/152238712.

Add annotation @Overide for the method to make sure it will not get
ignored when refactor in the future.

Bug: 154956584
Test: atest android.net.MatchAllNetworkSpecifierTest
Original-Change: https://android-review.googlesource.com/1295946
Merged-In: Ibe32fd50fae43aa635c1c0dad66eaea82011c8b7
Change-Id: Ibe32fd50fae43aa635c1c0dad66eaea82011c8b7
2020-11-18 06:59:52 +00:00
Chalard Jean
3c01153f05 Merge "Remove unused methods from LinkProperties." am: 88e32a8ae6 am: f812dc9b77 am: 57899a690d am: c703b02538
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1448415

Change-Id: I7e97ed89636e22553c6b2a3a759d2bdcbed9ba24
(cherry picked from commit 64db0ea5b0)
2020-10-22 02:12:47 +00:00
Anton Hansson
71bd86ed3d Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-19 19:08:26 +01:00
TreeHugger Robot
5059f9b004 [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours am: 2dbc78ee39 -s ours am: 12d5c16a87 -s ours am: ab53da358e -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12321778

Change-Id: I1808dfcf62cb957821fc86331814f74171b58204
2020-09-10 01:44:18 +00:00
TreeHugger Robot
ab53da358e [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours am: 2dbc78ee39 -s ours am: 12d5c16a87 -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12321778

Change-Id: I553eead2b24367b09f4888ea8a687c48cd2bf9da
2020-09-10 01:14:38 +00:00
TreeHugger Robot
12d5c16a87 [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours am: 2dbc78ee39 -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12321778

Change-Id: I90bb0d837e4ac6c3acc834653bc1f758d62e1a08
2020-09-10 00:46:56 +00:00
TreeHugger Robot
2dbc78ee39 [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12321778

Change-Id: I58327bb904244e5f962c27b7c8facdfeae8a758d
2020-09-10 00:27:47 +00:00
Etan Cohen
9aaf663dda [CS] Add an option to block sensitive network specifier
Network specifiers are used for 2 purposes:

- As part of network requests to specify more information on the type
  of requested networks.
- On network agents to specify information about their networks.

The network specifiers of the requests and agents are matched to each
other. However, the agent network specifier may contain sensitive
information which we do not want forwarded to any app.

This CL adds an option to strip out this agent network specifier before
the network capabilities are forwarded to the app.

Bug: 161853197
Bug: 161370134
Test: atest ConnectivityServiceTest (frameworks/base/tests/net)
Test: atest frameworks/base/tests/net
Test: atest frameworks/opt/net/wifi/tests/wifitests
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks/opt/net/ethernet/tests
Test: atest android.net.cts - some flakiness!
Test: act.py ThroughputTest
Test: act.py DataPathTest
Test: atest SingleDeviceTest (cts)
Change-Id: I38ed3ff88532ef522ab167c88d87e6e82295ffc5
Merged-In: If08d312ff814bdde1147518f923199e6349503d5
2020-09-07 00:37:33 +00:00
Remi NGUYEN VAN
b448894cf2 Disable FrameworksNetTests
Ideally the module branch would be unbundled and contain no framework
code or framework tests. Start by disabling the tests (which are not run
in this branch anyway) as they depend on test utils that are updated in
the module projects, but cannot be kept in sync as the latest tests
verify platform behavior that does not exist in the module branch.

Test: m
Bug: 166414751
Change-Id: I96f217663b073ada40710c0c8cdcb39b775eef55
2020-08-31 14:05:41 +09:00
Chalard Jean
872a24758c Rename Kotlin util files to not include the Kt suffix
Callers don't care what language the utilities are written in

This is a partial cherry-pick of the change in the packages/Tethering,
tests/net/common, tests/net/integration, wifi/tests directories. Other
tests cannot be kept in sync as the latest versions verify platform
functionalities that do not exist in the module branch, so disabling
them is less time-consuming than always resolving merge conflicts.

Test: builds
Merged-In: Ie212144f36c50db223c05f3fcb6bad745842cb5e
Change-Id: Ie212144f36c50db223c05f3fcb6bad745842cb5e
2020-08-31 14:02:06 +09:00
Chalard Jean
a9b3d51a11 Move utils from network stack to libs.
This package is using some common utilities from
a library that used to live in the network stack.
A better home for these utilities is frameworks/libs,
so this topic moves the files ther and also changes
the package of some utilities.

See aosp/1350222 and aosp/1350182 for a detailed
description of the specific files that moved.

Test: checkbuild
Original-change: aosp/1350083
Merged-In: I76a9b7790f3997e3e6b3c2f75ba6308286457cde
Change-Id: I76a9b7790f3997e3e6b3c2f75ba6308286457cde
2020-08-31 14:01:59 +09:00
Lorenzo Colitti
d287e8535d Set the NetworkInfo subtype to 0.
For non-telephony networks, this was always set to 0 before R.
In R, it is currently set to the same value as the network type.
This is incorrect because the two have different namespaces.
or example, currently, any network of type WIFI (==1) will have
a subtype of NETWORK_TYPE_GPRS (==1). Similarly, all ETHERNET
networks will have subtype NETWORK_TYPE_1XRTT, all VPN networks
will have a subtype of NETWORK_TYPE_TD_SCDMA, etd.

Bug: 161653721
Test: builds, boots
Change-Id: I07e111c1762e0021c931cefc27f193f78578748b
2020-07-28 09:20:19 +00:00
junyulai
94f8240582 Attribute data usage to virtual RAT type for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071
Merged-In: I8753e68140c0993773017c9a49bd8a666a364071
(cherry-picked from ag/12167624)
2020-07-16 15:33:35 +08:00
Chalard Jean
5cab5d2773 Add some more public doc for MacAddress
Bug: 140807677
Test: doc-only change
Original-Change: https://android-review.googlesource.com/1354447
Merged-In: I0f6e59eda42fd92ec34db0e9bc2d26d2e83d41d0
Change-Id: I0f6e59eda42fd92ec34db0e9bc2d26d2e83d41d0
2020-07-08 09:38:37 +00:00
Lorenzo Colitti
aace2f48a9 Send ConnDiags event before revalidating network in CS.
This change updates ConnectivityService to notify the
ConnectivityDiagnosticsHandler of app-reported connectivity before
attempting to revalidate the network. This change forces an ordering on
Connectivity Diagnostics events in the case that the reported
connectivity does not match the known connectivity for the network -
this leads to the network being revalidated and the
ConnectivityDiagnostics event onConnectivityReportAvailable. Passing the
onNetworkConnectivityReported event to the
ConnectivityDiagnosticsHandler first ensures that it is passed to
callbacks before any potential ConnectivityReports are.

Bug: 159718782
Test: android.net.cts.ConnectivityDiagnosticsManagerTest
Original-Change: https://android-review.googlesource.com/1350662
Merged-In: Ic7bc7138c54c47bbfdf56af5811709fde66f8606
Change-Id: Ic7bc7138c54c47bbfdf56af5811709fde66f8606
2020-06-26 07:59:04 +00:00
TreeHugger Robot
f6aeae7ca6 Merge "Update DnsManagerTest for AIDL interface change" into rvc-dev 2020-06-22 15:09:54 +00:00
TreeHugger Robot
160850d48d Merge "Support DNS-over-TLS probes in NetworkDiagnostics" into rvc-dev 2020-06-22 14:15:40 +00:00
Ken Chen
bfce3bc8e3 Update DnsManagerTest for AIDL interface change
Check one more parameter enforceDnsUid in ResolverOptionsParcel in
DnsManagerTest.

Bug: 159587277
Test: atest
com.android.server.connectivity.DnsManagerTest#testSendDnsConfiguration

Change-Id: Ic53f42b968626294c851dac252a70769846ba427
2020-06-22 21:44:07 +08:00
Lorenzo Colitti
500ee9a7b3 Merge "Make PendingIntent immutable and correct Settings package name" into rvc-dev 2020-06-22 09:00:25 +00:00