tag | cd85098d66f9bd762013b572d62804136a3d0097 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Jul 15 15:54:05 2022 -0700 |
object | 6a1e7bd2848ba477a662f4c88c32b27a4dd901a6 |
Android Mainline 12.0.0 Release 123 (8547520,com.google.android.permission)
commit | 6a1e7bd2848ba477a662f4c88c32b27a4dd901a6 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 05 20:50:16 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 05 20:50:16 2022 +0000 |
tree | 4b295a035418b81f7528d4f2deddec845fe9b7f3 | |
parent | 05f23e4b1ab79e2fb56aaeb7bc36f0b677792739 [diff] | |
parent | 4fd070c5fc95ed6c57bd2a3fe1d2a3c7b656bf06 [diff] |
Snap for 8408623 from 4fd070c5fc95ed6c57bd2a3fe1d2a3c7b656bf06 to mainline-permission-release Change-Id: Ibf8d92164a6dcecca4293284602e266ed35500e3
SdkExtensions module is responsible for:
The module is packaged in an apex, com.android.sdkext
, and has several components:
bin/derive_classpath
: a native binary that runs early in the device boot process. It reads individual classpath configs files from the system and other modules, merges them, and defines the definition of *CLASSPATH environ variables.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.pb
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)
.
derive_classpath
service reads and merges individual config files in the /system/etc/classpaths/
and /apex/*/etc/classpaths
. Each config stores protobuf message from classpaths.proto
in a proto binary format. Exact merging algorithm that determines the order of the classpath entries is described in derive_classpath.cpp
and may change over time.
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.