Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d6709189 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Convert NetworkStack shims from filegroup to libraries.

Currently, the NetworkStack shims are a filegroup containing the
shims for all SDK levels, plus networkstack-module-utils-srcs.
The whole filegroup compiles against either system_current (for
NetworkStackNext and friends) or the latest stable SDK.

This CL changes that to one java_library per SDK level. This
ensures that each shim level (e.g., NetworkStackApi30Shims) can
only use classes that are present in its SDK level. It also
allows a shim implementation to directly subclass the class it is
shimming, and automatically have all the methods (and only the
methods) that the real class has at the shim's SDK level.

This requires a few drive-by changes:
1. Because the shims are no longer a filegroup, they can no
   longer contain networkstack-module-utils-srcs. Move that to
   NetworkStackAndroidLibraryDefaults which already contains
   framework-networkstack-shared-srcs.
2. Change CaptivePortalDataShimImpl from the @NonNull in
   android (which the shims shouldn't depend on) to the @NonNull
   in androidx.
3. Remove the NetworkStackApiStableDependencies target. This is
   no longer necessary because the compat jarjar rules are now
   directly on NetworkStackApiStableShims.

Test: m NetworkStack NetworkStackNext
Test: atest NetworkStackCoverageTests
Test: atest NetworkStackTests NetworkStackNextTests
Test: atest NetworkStackIntegrationTests NetworkStackNextIntegrationTests
Change-Id: Icdac8247efebd763bfb4387ee51e8c09ef8c7fd8
parent ee6648c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment