commit | cd8df6cd38e0f7bcbbee673097b0f3a42f5e0840 | [log] [tgz] |
---|---|---|
author | Anton Hansson <hansson@google.com> | Wed Nov 18 19:39:14 2020 +0000 |
committer | Anton Hansson <hansson@google.com> | Thu Nov 19 17:13:50 2020 +0000 |
tree | 0816b40aacf8f9327aec80fd0b3da74c4f0e6545 | |
parent | 10c8718d1052f2139ef889d9eebd0ecb170e1698 [diff] |
Decouple sdkextension tests from their baseclass The base class was made for a simpler use case, and the sdkextensions tests have outgrown it. Additionally, much of the reusable logic is now in a shared utility class instead. Test: sdkextensions_e2e_tests Change-Id: Icb4ccbe585a9ec4725d1ff2f0707167ebdbd9db8
SdkExtensions is a module that decides the extension SDK level of the device, and provides APIs for applications to query the extension SDK level.
The module is packaged in an apex, com.android.sdkext
, and has two components:
bin/derive_sdk
: Native binary that runs early in the device boot process and reads metadata of other modules, to set system properties relating to the extension SDK (for instance build.version.extensions.r
).javalib/framework-sdkextension.jar
: This is a jar on the bootclasspath that exposes APIs to applications to query the extension SDK level.derive_sdk
is a program that reads metadata stored in other apex modules, in the form of binary protobuf files in subpath etc/sdkinfo.binarypb
inside each apex. The structure of this protobuf can be seen here. The exact steps for converting a set of metadata files to actual extension versions is likely to change over time, and should not be depended upon.
The module exposes a java class SdkExtensions
in the package android.os.ext
. The method getExtensionVersion(int)
can be used to read the version of a particular sdk extension, e.g. getExtensionVersion(Build.VERSION_CODES.R)
.