tag | 4951ee033c94216e4951e092afa5f3585f43f166 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Sun Jun 06 02:22:28 2021 -0700 |
object | 635df16f93d5ca499eae86cec7d95838f7e1a190 |
Android Mainline 11.0.0 Release 23 (7208273)
commit | 635df16f93d5ca499eae86cec7d95838f7e1a190 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Fri Mar 12 09:18:14 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Fri Mar 12 09:18:14 2021 +0000 |
tree | c87df75e0bbbc85ca68acdc3e995e7947da30580 | |
parent | 4ab829bfa523fafc814ae32913dd360322401b22 [diff] | |
parent | 879aea5b62ba4b45878559df7766c43ab69b8950 [diff] |
Snap for 7203496 from 879aea5b62ba4b45878559df7766c43ab69b8950 to mainline-extservices-release Change-Id: I9dd7a6ad960e8f3fd49d8f0f7f29417e8e04f58f
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)
.
For every new Android SDK level a new extension version should be defined. These are the steps necessary to do that:
derive_sdk.cpp
by:GetSdkLevel
with the new enum setderive_sdk_test.cpp
verifying the new extensions worksSdkExtensions.getExtensionVersion
API support the new extensions.RollbackManagerServiceImpl#getExtensionVersions
to account for the new extension version.