Convert raven/preloaded_nanoapps.json's .mk file to Android.bp.

Since `preloaded_nanoapps.json` has different configurations for
`factory` products and `non-factory` products, `soong_namespace {}`
needs to be added to the converted Android.bp file to avoid misuse.

Additionally, due to ag/27170563, a common inheritance layer has been
added to all `non-factory` products. Therefore, setting different
`PRODUCT_SOONG_NAMESPACES` in the corresponding `<DEVICE>_generic.mk`
and `factory_<DEVICE>.mk` files will allow factory products and
non-factory products to use different preloaded_nanoapps.json.

Bug: 338005353
Test: 1. lunch <product_name>-trunk_staging-userdebug && \
         m -j preloaded_nanoapps.json
      2. Check ./out/target/product/<device_name>/.../preloaded_nanoapps.json
         It should be the <device_name> version.
      3. lunch factory_<device_name>-trunk_staging-userdebug && \
         m -j preloaded_nanoapps.json
      4. Check ./out/target/product/<device_name>/.../preloaded_nanoapps.json
         It should be the factory version.
Change-Id: Ie4551fc30c75a401a615a729e651949696117352
This commit is contained in:
Nelson Li
2024-05-06 02:19:37 +00:00
committed by Treehugger Robot
parent 2dd9ebfb37
commit 1413e4537f
2 changed files with 6 additions and 0 deletions

View File

@@ -32,3 +32,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Factory binaries of camera
PRODUCT_PACKAGES += fatp_gn1_hat_tool fatp_imx586_hat_tool
# preloaded_nanoapps.json
PRODUCT_SOONG_NAMESPACES += vendor/google_contexthub/devices/factory

View File

@@ -15,3 +15,6 @@
#
$(call inherit-product, device/google/raviole/device-raven.mk)
# preloaded_nanoapps.json
PRODUCT_SOONG_NAMESPACES += vendor/google_contexthub/devices/raven