Allow individual devices to disable cameraserver.

cameraserver takes ~3 MiB of RAM; on some devices this is a significant
amount. Dropping the cameraserver package for these devices (which
provides cameraserver.rc) is an easy and clean way of ensuring
cameraserver doesn't start for these devices.

Bug: 118369095
Test: built image, `grep cameraserver out/target/product/$PRODUCT/installed-files.txt` shows cameraserver and cameraserver.rc
Change-Id: I23c10efbdcebca02b7a72bb77018df17e732bf2c
diff --git a/products/atv_base.mk b/products/atv_base.mk
index de1ab4f..32d9b48 100644
--- a/products/atv_base.mk
+++ b/products/atv_base.mk
@@ -66,8 +66,20 @@
     local_time.default \
     screenrecord
 
-PRODUCT_PACKAGES += \
-    cameraserver
+# PRODUCT_SUPPORTS_CAMERA: Whether the product supports cameras at all
+# (built-in or external USB camera). When 'false', we drop cameraserver, which
+# saves ~3 MiB of RAM. When 'true', additional settings are required for
+# external webcams to work, see "External USB Cameras" documentation.
+#
+# Defaults to true to mimic legacy behaviour.
+PRODUCT_SUPPORTS_CAMERA ?= true
+ifeq ($(PRODUCT_SUPPORTS_CAMERA),true)
+    PRODUCT_PACKAGES += cameraserver
+else
+    # When cameraserver is not included, we need to configure Camera API to not
+    # connect to it.
+    PRODUCT_PROPERTY_OVERRIDES += config.disable_cameraservice=true
+endif
 
 PRODUCT_COPY_FILES += \
     frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf