summaryrefslogtreecommitdiff
path: root/src/android/net/util/NetworkStackUtils.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2019-09-06 13:00:33 +0900
committerRemi NGUYEN VAN <reminv@google.com>2019-10-28 15:42:08 +0900
commit794a4b5b5a41dbbb5983378288627fe24cc293bd (patch)
tree393b505b9ebe3713c93bf858a363f7fcef4e01c6 /src/android/net/util/NetworkStackUtils.java
parentf3f5f36d71ff21eeb987781a8de4076bb35a232c (diff)
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
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
0 files changed, 0 insertions, 0 deletions