Commit Graph

8 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
66c27c18a2 Let LinkProperties#getRoutes() keeps returning all routes before T
Starting from T, VpnService supports exclude routes, which will
make the caller to get both of include routes and exclude routes
from LinkProperties#getRoutes(), and it's not expected to get the
exclude routes before T in production code even though the code
returns all routes.

But there is a CTS - LinkPropertiesTest#testRouteAddWithSameKey()
will try to add an exclude route and check if the result of
LinkProperties#getRoutes() contains that exclude route or not.
And the test is failed now since LinkProperties#getRoutes() will
only return include route if compat feature - EXCLUDED_ROUTES is
disabled. (EXCLUDED_ROUTES is enabled starting from target SDK T)

To fix this test failure, let LinkProperties#getRoutes() keeps
returning all routes if SDK is before T. This avoids changing
behavior on S, and even though there is still a behavior change
when upgrading to T, apps are unlikely to be relying on such
behavior, especially outside of tests.

Bug: 238061814
Test: Run "atest CtsNetTestCases:LinkPropertiesTest" on S build
      with mainline module which contains this patch.
Change-Id: Iac4362c4fe347ee3f06d5b21b0325fa69a7f27b6
2022-07-14 18:54:05 +09:00
Prerana Patil
a1c6dbbd53 Merge "Update VPN isolation code for excluded routes" 2022-05-03 17:40:12 +00:00
Prerana
2b97bbebf4 Update VPN isolation code for excluded routes
Bug: 230058738
Test: atest LinkPropertiesTest

Result: https://paste.googleplex.com/4706859672928256

Change-Id: I970fca6b0e2cd358e9bd77152563d13367867c74
2022-04-29 22:23:02 +00:00
Taras Antoshchuk
af3c360ed4 Fix targetSdkVersion gate for EXCLUDED_ROUTES compat change
Bug: 230726333
Test: check Developer options > App Compat Changes
Change-Id: Ia80efd07e6a8c6e6cc043411fbc2b56b07b4dd06
2022-04-28 15:47:29 +02:00
Taras Antoshchuk
30d41e59bc Filter out excluded routes in LinkProperties
Gate presence of excluded routes in LinkProperties on target sdk T.

Bug: 186082280
Test: atest LinkPropertiesTest
Change-Id: If8fdb468a0a4968c5f2a878b7aacfeb4f7d9a9e5
2022-04-13 01:17:56 +02:00
Chiachang Wang
52a55928a8 Remove hidden method link in public addRoute API
The build will complain after moving connectivity framework code
outside framework because the hidden methods/members accesses are
not allowed anymore. Link to a hidden class will not work since
it's not visible in public.

Bug: 182859030
Test: make docs
Change-Id: I5726f80be7cf92b648ce851d9601d5f58bc2b647
2021-04-15 16:21:00 +08:00
Roman Kalukiewicz
384a8c63f2 Add @Nullable to Object#equals()
This is a partial cherry-pick of change:
I5eedb571c9d78862115dfdc5dae1cf2a35343580

for connectivity classes.

Bug: 170883422
Test: m
Merged-In: I5eedb571c9d78862115dfdc5dae1cf2a35343580
Change-Id: I7dc661863b73f4198ddb4f3a1566583d0f07db3c
2021-02-05 07:28:44 +00:00
Remi NGUYEN VAN
0f8f6307e7 Move module sources to packages/Connectivity
Files that are planned to be part of the connectivity module are grouped
in packages/Connectivity, so they can be built separately and moved in
one operation with their history into packages/modules/Connectivity.

This places the files in the existing framework-connectivity-sources
filegroup instead of the current framework-core-sources filegroup. Both
are used the same way in framework-non-updatable-sources.

Bug: 171540887
Test: m
Change-Id: I62d9d91574ace6f5c4624035d190260c3126b91e
2021-02-01 11:52:14 +09:00