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

Skip to content
Commit 794a4b5b authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Compile NetworkStackApiStable as system_29

Also slightly change the structure of shims so that the compat version
uses a different package (com.android.networkstack.apishim.api29),
which is jarjared to the main package name on API stable builds. On API
current builds, the shim falls back to the compat version if
Build.VERSION is older, or uses the main package otherwise.

Jarjar requires using a java_library instead of a filegroup, so the
shims build targets are converted to java_libraries.

This allows the API current build to be usable on older devices, since
it will automatically fall back to the compat APIs. When the new SDK is
finalized, the API current build can then be shipped without code
modification.
The code also looks better in IDEs as there are no package conflicts.

If there are several versions of the same shim depending on the API
level (so different implementations for different methods in
SocketUtilsShimImpl depending on the API level), having the shim extend
the previous version shim allows to add methods with compatibility
behavior without re-implementing the whole class.

Test: m NetworkStack NetworkStackApiStable
Test: flashed, WiFi working
Test: atest NetworkStackTests

Change-Id: I86f28912b80b8396d6b9b2acd2e247651ba80289
parent f3f5f36d
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