Split light HAL out from small_hals
We need the light HAL to start early in the boot process for boot
animation.
Bug: 125349137
Test: Build and boot crosshatch.
Change-Id: Id8eb928b9924eeae20f2988ed15518311a3a1a29
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 7b7a6ec..a4963f7 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -153,10 +153,8 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.atrace@1.0-service.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.atrace@1.0-service.xml)
-# Combine light/memtrack/thermal/vibrator HALs into small_hals.crosshatch-service
+# Combine memtrack/thermal/vibrator HALs into small_hals.crosshatch-service
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.vibrator@1.2-service.crosshatch.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.vibrator@1.2-service.crosshatch)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.memtrack@1.0-service.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.memtrack@1.0-service)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/hardware.google.light@1.0-service.rc)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/hardware.google.light@1.0-service)
diff --git a/device.mk b/device.mk
index d806a17..4dbc70a 100644
--- a/device.mk
+++ b/device.mk
@@ -366,13 +366,16 @@
PRODUCT_PACKAGES += \
android.hardware.health.storage@1.0-service
-# Light/Memtrack/Vibrator HALs
+# Light HAL
+PRODUCT_PACKAGES += \
+ lights.$(PRODUCT_PLATFORM) \
+ hardware.google.light@1.0-service
+
+# Memtrack/Vibrator HALs
PRODUCT_PACKAGES += \
memtrack.sdm845 \
android.hardware.memtrack@1.0-impl \
android.hardware.vibrator@1.2-impl.crosshatch \
- lights.$(PRODUCT_PLATFORM) \
- hardware.google.light@1.0-impl \
small_hals.crosshatch-service
# Bluetooth HAL
diff --git a/manifest.xml b/manifest.xml
index 3adedcd..6b47c85 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -198,6 +198,24 @@
</interface>
</hal>
<hal format="hidl">
+ <name>android.hardware.light</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>ILight</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>hardware.google.light</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>ILight</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
<name>android.hardware.media.c2</name>
<transport>hwbinder</transport>
<version>1.0</version>
diff --git a/small_hals/Android.bp b/small_hals/Android.bp
index 8df722d..489c141 100644
--- a/small_hals/Android.bp
+++ b/small_hals/Android.bp
@@ -9,12 +9,10 @@
srcs: ["service.cpp"],
shared_libs: [
- "android.hardware.light@2.0",
"android.hardware.memtrack@1.0",
"android.hardware.vibrator@1.0",
"android.hardware.vibrator@1.1",
"android.hardware.vibrator@1.2",
- "hardware.google.light@1.0",
"libbase",
"libhidlbase",
"libhidltransport",
diff --git a/small_hals/service.cpp b/small_hals/service.cpp
index 4517675..41eaf9c 100644
--- a/small_hals/service.cpp
+++ b/small_hals/service.cpp
@@ -18,7 +18,6 @@
#include <android/hardware/memtrack/1.0/IMemtrack.h>
#include <android/hardware/vibrator/1.2/IVibrator.h>
-#include <hardware/google/light/1.0/ILight.h>
#include <hidl/LegacySupport.h>
using android::OK;
@@ -27,11 +26,9 @@
using android::hardware::registerPassthroughServiceImplementation;
using android::hardware::memtrack::V1_0::IMemtrack;
using android::hardware::vibrator::V1_2::IVibrator;
-using hardware::google::light::V1_0::ILight;
int main(int /*argc*/, char ** /*argv*/) {
configureRpcThreadpool(1, true /* callerWillJoin */);
- LOG_ALWAYS_FATAL_IF(OK != registerPassthroughServiceImplementation<ILight>());
LOG_ALWAYS_FATAL_IF(OK != registerPassthroughServiceImplementation<IMemtrack>());
LOG_ALWAYS_FATAL_IF(OK != registerPassthroughServiceImplementation<IVibrator>());
joinRpcThreadpool();
diff --git a/small_hals/small_hals.crosshatch-service.xml b/small_hals/small_hals.crosshatch-service.xml
index 579259b..dadde0d 100644
--- a/small_hals/small_hals.crosshatch-service.xml
+++ b/small_hals/small_hals.crosshatch-service.xml
@@ -1,23 +1,5 @@
<manifest version="1.0" type="device">
<hal format="hidl">
- <name>android.hardware.light</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>ILight</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
- <name>hardware.google.light</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ILight</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
<name>android.hardware.memtrack</name>
<transport>hwbinder</transport>
<version>1.0</version>