health: passthrough impl works now?
Not sure which of these changes was the magic one, maybe a combination.
The passthrough HAL now actually boots!
diff --git a/device-common.mk b/device-common.mk
index 473d570..67785b4 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -165,7 +165,7 @@
# Health
PRODUCT_PACKAGES += \
android.hardware.health@2.1-service \
- android.hardware.health@2.1-impl-sdm845 \ # Passthrough implementation
+ android.hardware.health@2.1-impl-gsdm845 \ # Passthrough implementation
# Cuttlefish health
# PRODUCT_PACKAGES += \
diff --git a/health/Android.bp b/health/Android.bp
index 16b2ab4..60f1f84 100644
--- a/health/Android.bp
+++ b/health/Android.bp
@@ -1,13 +1,18 @@
cc_library_shared {
- name: "android.hardware.health@2.1-impl-sdm845",
- //stem: "android.hardware.health@2.1-impl-2.1-sdm845",
+ name: "android.hardware.health@2.1-impl-gsdm845",
+ stem: "android.hardware.health@2.0-impl-2.1-gsdm845",
// Install to vendor and recovery.
- vendor: true,
+ proprietary: true,
//recovery_available: true,
relative_install_path: "hw",
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
shared_libs: [
"libbase",
"libcutils",
diff --git a/health/HealthImpl.cpp b/health/HealthImpl.cpp
index 4cd3f1e..fce545c 100644
--- a/health/HealthImpl.cpp
+++ b/health/HealthImpl.cpp
@@ -1,12 +1,11 @@
#include <memory>
-#include <string_view>
#include <health/utils.h>
#include <health2impl/Health.h>
#include <hidl/Status.h>
#include <log/log.h>
-
-#include <string_view>
+#include <android-base/strings.h>
+#include <string>
using ::android::sp;
using ::android::hardware::Return;
@@ -75,6 +74,7 @@
using ::android::hardware::health::V2_1::implementation::HealthImpl;
ALOGI("Instance is %s", instance);
if (instance != "default"sv) {
+ ALOGE("Instance is not supported");
return nullptr;
}
ALOGI("Before InitHealthdConfig()");