Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e1d94cf authored by Sandeep Patil's avatar Sandeep Patil
Browse files

health: add default health HAL service implementation



Test: Tested with stub HAL on angler
Bug: b/32754732

Change-Id: I54a5ac536e1f34cf2498972653aef702cd926b2a
Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
parent c7a5ff73
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -34,4 +34,23 @@ LOCAL_SHARED_LIBRARIES := \

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE := android.hardware.health@1.0-service
LOCAL_INIT_RC := android.hardware.health@1.0-service.rc
LOCAL_SRC_FILES := \
    HealthService.cpp \

LOCAL_SHARED_LIBRARIES := \
    liblog \
    libcutils \
    libdl \
    libbase \
    libutils \
    libhwbinder \
    libhidl \
    android.hardware.health@1.0 \

include $(BUILD_EXECUTABLE)

include $(call first-makefiles-under,$(LOCAL_PATH))
+27 −0
Original line number Diff line number Diff line
/*
 * Copyright 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#define LOG_TAG "android.hardware.health@1.0-service"

#include <android/hardware/health/1.0/IHealth.h>
#include <hidl/LegacySupport.h>

using android::hardware::health::V1_0::IHealth;
using android::hardware::defaultPassthroughServiceImplementation;

int main() {
    return defaultPassthroughServiceImplementation<IHealth>("health");
}
+4 −0
Original line number Diff line number Diff line
service health-hal-1-0 /system/bin/hw/android.hardware.health@1.0-service
    class hal
    user system
    group system