Merge "Allow permission to be treated as optional at build time" am: 855f323a68

Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2151273

Change-Id: I6c3f7e74cb8f0d3248006e536536ae8b0771979b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Paul Duffin
2022-07-13 14:13:21 +00:00
committed by Automerger Merge Worker

View File

@@ -739,6 +739,19 @@ class MainlineModule:
# #
# This field records the last build release in which they are optional. It # This field records the last build release in which they are optional. It
# defaults to None which indicates that the module was never optional. # defaults to None which indicates that the module was never optional.
#
# TODO(b/238203992): remove the following warning once all modules can be
# treated as optional at build time.
#
# DO NOT use this attr for anything other than controlling whether the
# generated snapshot uses its own Soong config variable or the common one.
# That is because this is being temporarily used to force Permission to have
# its own Soong config variable even though Permission is not actually
# optional at runtime on a GMS capable device.
#
# b/238203992 will make all modules have their own Soong config variable by
# default at which point this will no longer be needed on Permission and so
# it can be used to indicate that a module is optional at runtime.
last_optional_release: typing.Optional[BuildRelease] = None last_optional_release: typing.Optional[BuildRelease] = None
# The short name for the module. # The short name for the module.
@@ -903,6 +916,11 @@ MAINLINE_MODULES = [
# that are provided in R by non-updatable parts of the # that are provided in R by non-updatable parts of the
# bootclasspath. # bootclasspath.
]), ]),
# Although Permission is not, and has never been, optional for GMS
# capable devices it does need to be treated as optional at build time
# when building non-GMS devices.
# TODO(b/238203992): remove once all modules are optional at build time.
last_optional_release=LATEST,
), ),
MainlineModule( MainlineModule(
apex="com.android.scheduling", apex="com.android.scheduling",