Commit Graph

9513 Commits

Author SHA1 Message Date
Lorenzo Colitti
9dd20e012e Merge "Refactor the Nat464Xlat function for simplicity." am: b51a47360b am: 55462d27a2 am: ee85002f9b
Change-Id: I0f598e2e79c596903d25e5852b982951da03093c
2020-04-06 11:42:51 +00:00
Lorenzo Colitti
ee85002f9b Merge "Refactor the Nat464Xlat function for simplicity." am: b51a47360b am: 55462d27a2
Change-Id: I8cb3fb435baae54f5e811cae1efb603d585a28e9
2020-04-06 11:24:19 +00:00
Lorenzo Colitti
55462d27a2 Merge "Refactor the Nat464Xlat function for simplicity." am: b51a47360b
Change-Id: I4947abc132dcd0c83b44f2c23362049ee1073214
2020-04-06 11:01:50 +00:00
Lorenzo Colitti
b51a47360b Merge "Refactor the Nat464Xlat function for simplicity." 2020-04-06 10:38:54 +00:00
Lucas Lin
6b9fd85bd1 [automerger skipped] Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e -s ours am: b8b60d252d -s ours
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history

Change-Id: I499cb4ab198cd203664d9c04fa394e3e2baa88cc
2020-04-06 10:07:12 +00:00
Lucas Lin
98856ab26a [automerger skipped] Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e am: 74c73dc3b2 -s ours
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history

Change-Id: If07a38514039f836988794719ceaf5c1c6acce20
2020-04-06 10:06:21 +00:00
Lucas Lin
74c73dc3b2 Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e
Change-Id: Ice0a1fad4a430175b49a047b824e97b1a8df955e
2020-04-06 09:46:21 +00:00
Lucas Lin
b8b60d252d [automerger skipped] Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev am: 5123e0509e -s ours
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history

Change-Id: Ib67921fdf3384f3c79d8b859ed068578575cdaa9
2020-04-06 09:46:19 +00:00
Lucas Lin
5123e0509e Merge "Add MatchAllNetworkSpecifierTest" into rvc-dev 2020-04-06 09:35:27 +00:00
Chalard Jean
ebf3cf3aa3 Merge "Fix a bug where the legacy extra info is reset on connect." am: 7e2d55206e am: 9f964ebc15 am: a6e848328a
Change-Id: I0406172efbdbbffe5db66efc3b94844bf14d6f04
2020-04-06 06:53:58 +00:00
Chalard Jean
a6e848328a Merge "Fix a bug where the legacy extra info is reset on connect." am: 7e2d55206e am: 9f964ebc15
Change-Id: I127bf621caa39a24265f30cd4c781248410e5348
2020-04-06 06:34:09 +00:00
Chalard Jean
9f964ebc15 Merge "Fix a bug where the legacy extra info is reset on connect." am: 7e2d55206e
Change-Id: Ia0a2afe359cac6adfd33d2f839eddb8bd14b5f43
2020-04-06 06:17:46 +00:00
Chalard Jean
7e2d55206e Merge "Fix a bug where the legacy extra info is reset on connect." 2020-04-06 06:04:46 +00:00
Junyu Lai
7678472859 [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1 -s ours am: c7222f9fbe -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 b80fe74899 is in history

Change-Id: I91c97fec88b2275764d5804523a39922c6257340
2020-04-06 04:52:38 +00:00
Junyu Lai
aaa6381a8b [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1 am: 48d226dd0c -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 e47c7e42e5 is in history

Change-Id: I71a8317ba7e296356aee4d6e60c431d5c7836604
2020-04-06 04:52:11 +00:00
junyulai
ecf8308cc3 [automerger skipped] [SP26.2] add a method in NetworkStats that removes empty entries am: 56f59c493b am: 254fddb571 -s ours
am skip reason: Change-Id I40a76935d55712b8083ee1e17e137a8a4ef5e029 with SHA-1 1052557f33 is in history

Change-Id: If3793def11b38b66cc7dd788af82f6c0f394cd99
2020-04-06 04:52:05 +00:00
Junyu Lai
48d226dd0c Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1
Change-Id: Ie62147dc37f99d05fae4eecccc00f1b15f429220
2020-04-06 04:28:36 +00:00
junyulai
254fddb571 [SP26.2] add a method in NetworkStats that removes empty entries am: 56f59c493b
Change-Id: Ib92c9cff431d5f6f72598550cc7cc869b340c396
2020-04-06 04:28:34 +00:00
Junyu Lai
c7222f9fbe [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: c6b106fbc1 -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 e47c7e42e5 is in history

Change-Id: I1a97a8cb46302c29425781b9252640c1eec4b50b
2020-04-06 04:27:56 +00:00
Junyu Lai
c6b106fbc1 Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev
* changes:
  [SP26] add CTS for NetworkStats
  [SP26.2] add a method in NetworkStats that removes empty entries
2020-04-06 04:15:39 +00:00
Chalard Jean
56c327341e Fix a bug where the legacy extra info is reset on connect.
Bug: 149459996
Test: NetworkAgentTest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I5f8f6d962ee3317e101d19518c767b3c327c0c47
2020-04-06 12:46:19 +09:00
Remi NGUYEN VAN
7aa97d2b77 [automerger skipped] Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5 -s ours am: a678d4fd51 -s ours
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 24260d5e6d is in history

Change-Id: I6d2d3f2b568b39f0ae385a3aff63c84452bce28f
2020-04-06 02:42:49 +00:00
Remi NGUYEN VAN
a760a047d3 [automerger skipped] Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5 am: c69180459a -s ours
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 824f80b129 is in history

Change-Id: I12f74893d28783a0299ddf24228e7695cfab667f
2020-04-06 02:42:37 +00:00
Remi NGUYEN VAN
a678d4fd51 [automerger skipped] Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5 -s ours
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 824f80b129 is in history

Change-Id: I16bc94e46e253b70ed58f4bbd5d14c1214024f30
2020-04-06 02:24:59 +00:00
Remi NGUYEN VAN
c69180459a Merge "Fix setAdministratorUids tests on Q" into rvc-dev am: 0b4ad3a9d5
Change-Id: Ic59499e070b009dddedcaeb2e6905fb563779841
2020-04-06 02:24:38 +00:00
Remi NGUYEN VAN
0b4ad3a9d5 Merge "Fix setAdministratorUids tests on Q" into rvc-dev 2020-04-06 02:22:37 +00:00
Junyu Lai
b80fe74899 [SP26] add CTS for NetworkStats
Test: atest NetworkStatsApiTest
Test: atest CtsNetTestCasesLatestSdk:NetworkStatsApiTest on Q device
Bug: 150644692
Change-Id: I690704b43cfd16de70c4c83916f6d750cf613f67
Merged-In: I690704b43cfd16de70c4c83916f6d750cf613f67
(cherry picked from commit 5c670a2714f3ed783b6d5245714d0039c8fd1e9c)
2020-04-06 02:21:17 +00:00
junyulai
56f59c493b [SP26.2] add a method in NetworkStats that removes empty entries
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.

However, change the behavior in the original NetworkStats
is considered risky in current stage.

Thus, this change provide a function that could remove these
empty entries in tests.

Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692

Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
Merged-In: I40a76935d55712b8083ee1e17e137a8a4ef5e029
(cherry picked from commit 6c7bef3064dbe949b7b213036b8e70c125ddd343)
2020-04-06 02:18:50 +00:00
Lorenzo Colitti
0d6e50a29d Refactor the Nat464Xlat function for simplicity.
This makes the code easier to understand by making state
transitions more explicit. It also makes it easier to address a
TODO to turn the class into a StateMachine.

This should be an exact no-op refactoring. The current cases
covered by the code (all mutually exclusive) are:

1. requiresClat && !isPrefixDiscoveryStarted
   Action: startPrefixDiscovery()
   Equivalent to IDLE && requiresClat, because
   isPrefixDiscoveryStarted returns true for every state except
   IDLE.

2. requiresClat && isPrefixDiscoveryStarted && shouldStartClat
   Action: start()
   Equivalent to DISCOVERING && shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but start() does nothing if mState is
   STARTING or RUNNING.

3. requiresClat && isPrefixDiscoveryStarted && !shouldStartClat
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but stop() does nothing if mState is
   not STARTING or RUNNING.

4. !requiresClat && isStarted
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !requiresClat,
   because isStarted() is only true in STARTING and RUNNING.

5. !requiresClat && !isStarted && isPrefixDiscoveryStarted
   Action: leaveStartedState()
   Equivalent to DISCOVERING && !requiresClat, because
   the only state with isPrefixDiscoveryStarted and !isStarted
   is DISCOVERING.

Also, simplify case #5. In this case, calling leaveStartedState
is superfluous, because in the DISCOVERING state:
- There is no need to call unregisterObserver, since the observer
  is only registered when entering STARTING and is unregistered
  when going back to DISCOVERING or IDLE.
- mIface and mBaseIface don't need to be set to null because they
  are only set to non-null when entering STARTING and nulled out
  when going back to DISCOVERING or IDLE.

Bug: 126113090
Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Change-Id: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
2020-04-04 16:24:58 +09:00
TreeHugger Robot
ba808127e6 [automerger skipped] Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1 -s ours am: caa3a41ed6 -s ours
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 7fb7c3e0bf is in history

Change-Id: I831d43cc9ba89ef8f632c2306b65378895d63499
2020-04-04 04:10:13 +00:00
TreeHugger Robot
b5c22182e8 [automerger skipped] Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1 am: 1c221a5295 -s ours
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 ab8cf306ea is in history

Change-Id: I28e2ff1095f168d1e3c7321ab52629b0a9391c1d
2020-04-04 04:10:04 +00:00
TreeHugger Robot
1c221a5295 Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1
Change-Id: Ibd13db0076a1dcaefd3b006001d24ad3e763409f
2020-04-04 03:48:35 +00:00
TreeHugger Robot
caa3a41ed6 [automerger skipped] Merge "Only apply VPN isolation if it's fully routed" into rvc-dev am: 147d1574b1 -s ours
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 ab8cf306ea is in history

Change-Id: I46103ffe30615b2949cf9d600c32785b3c28b816
2020-04-04 03:48:18 +00:00
TreeHugger Robot
147d1574b1 Merge "Only apply VPN isolation if it's fully routed" into rvc-dev 2020-04-04 03:44:46 +00:00
Remi NGUYEN VAN
24260d5e6d Fix setAdministratorUids tests on Q
setAdministratorUids does not exist on Q, so such tests must be skipped
on Q devices.

Bug: 147903575
Test: atest CtsNetTestCasesLatestSdk on Q and AOSP devices
Merged-In: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
Change-Id: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
2020-04-03 09:42:33 +00:00
Remi NGUYEN VAN
e1c94d6fd5 Merge "Fix setAdministratorUids tests on Q" am: 7e3fc61cf1 am: a59e208450 am: 91627585e3
Change-Id: I0044469ee26a2e29969b9a04d68f3e6e1faaba34
2020-04-03 09:04:27 +00:00
Remi NGUYEN VAN
91627585e3 Merge "Fix setAdministratorUids tests on Q" am: 7e3fc61cf1 am: a59e208450
Change-Id: Ifbcb485fad3a61c2cf48fb6e264bcdc130119ff0
2020-04-03 08:41:32 +00:00
Remi NGUYEN VAN
95e3e52b6e [automerger skipped] Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev am: d8223ef5fc am: 03d15b5453 -s ours
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 ccd5ba288a is in history

Change-Id: I4a36bd6fe06407f343fa6a518367c3b9630cbec9
2020-04-03 08:20:08 +00:00
Remi NGUYEN VAN
0d8275588e [automerger skipped] Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev am: d8223ef5fc -s ours am: af77f3649c -s ours
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 7988471ec9 is in history

Change-Id: Ieef14cead5cecaa554553fda864c4275a85a3edb
2020-04-03 08:19:14 +00:00
Remi NGUYEN VAN
af77f3649c [automerger skipped] Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev am: d8223ef5fc -s ours
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 7988471ec9 is in history

Change-Id: I329d322e10096178ea82d213414c2866f596ff12
2020-04-03 08:17:11 +00:00
Remi NGUYEN VAN
03d15b5453 Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev am: d8223ef5fc
Change-Id: I756521af50e0176817cc1502e5a5b2ad15979817
2020-04-03 08:17:06 +00:00
Remi NGUYEN VAN
a59e208450 Merge "Fix setAdministratorUids tests on Q" am: 7e3fc61cf1
Change-Id: I1f9a335e4f7b97d2af47745709d90cfdab353154
2020-04-03 08:17:00 +00:00
Remi NGUYEN VAN
7e3fc61cf1 Merge "Fix setAdministratorUids tests on Q" 2020-04-03 07:54:59 +00:00
Remi NGUYEN VAN
d8223ef5fc Merge "Make LinkPropertiesTest compatible with Q" into rvc-dev 2020-04-03 07:52:26 +00:00
Automerger Merge Worker
b8eae6fdf5 Merge "Merge "Added a new capability for temporarily unmetered network." into rvc-dev am: 0edabc5e4e am: 1dbf63da06" into rvc-d1-dev-plus-aosp 2020-04-03 05:26:13 +00:00
Lorenzo Colitti
6095f2122d Merge "Added a new capability for temporarily unmetered network." into rvc-dev am: 0edabc5e4e am: 53e0564ca4
Change-Id: I71f7a2735dd8152889f95d004dcc45af79d940a6
2020-04-03 05:26:04 +00:00
Lorenzo Colitti
9da2c8b650 Merge "Added a new capability for temporarily unmetered network." into rvc-dev am: 0edabc5e4e am: 1dbf63da06
Change-Id: I6e4a59ed2d070c9a4c8eadd843baaa891b73e7d6
2020-04-03 05:25:58 +00:00
Lorenzo Colitti
53e0564ca4 Merge "Added a new capability for temporarily unmetered network." into rvc-dev am: 0edabc5e4e
Change-Id: I4d43b28d25529d4dd9e4304c4edf95edb5c5110b
2020-04-03 05:07:20 +00:00
Lorenzo Colitti
1dbf63da06 Merge "Added a new capability for temporarily unmetered network." into rvc-dev am: 0edabc5e4e
Change-Id: I2954f582524903c542a65439fba05af6cc37aa0f
2020-04-03 05:07:14 +00:00
Jack Yu
71863e9604 Added a new capability for temporarily unmetered network.
Added a new network capability TEMOPORARILY_NOT_METERED to support
the case that a network can temporarily become unmetered. This
allows carriers to deploy unmetered 5G network. When devices
camp on 5G network, this capability will be dynamically added
to the network and will be removed once leaving 5G coverage.

Bug: 153081494
Test: Manual
Change-Id: I10e26cb0852e67f614e7b9c4e49f95e078602e21
2020-04-02 19:28:41 -07:00