flo: sensors: Adjust for our usecase

* Rename hals.conf -> _hals.conf so legitimate
  MultiHAL won't attempt to load our HALs.
* Rename multihal -> multihal-asus so soong
  doesn't complain about duplicate package names.
* Remove USE_SENSOR_MULTI_HAL flag requirement so
  we can actually build it.
* Use TARGET_BOARD_PLATFORM variable in package
  name because it's a common tree.

Change-Id: I6287d106bc2783ec7d6c78b9d6bf5fadf8c4244f
This commit is contained in:
LuK1337 2017-09-05 19:46:25 +02:00 committed by Artem Borisov
parent d51f14e26c
commit 338217adee
3 changed files with 4 additions and 8 deletions

View File

@ -1,5 +1,5 @@
cc_library_static {
name: "multihal",
name: "multihal-asus",
vendor: true,
srcs: [
"multihal.cpp",

View File

@ -16,11 +16,9 @@
LOCAL_PATH := $(call my-dir)
ifeq ($(USE_SENSOR_MULTI_HAL),true)
include $(CLEAR_VARS)
LOCAL_MODULE := sensors.$(TARGET_DEVICE)
LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
@ -41,6 +39,4 @@ LOCAL_STRIP_MODULE := false
include $(BUILD_SHARED_LIBRARY)
endif # USE_SENSOR_MULTI_HAL
include $(call all-makefiles-under, $(LOCAL_PATH))

View File

@ -19,10 +19,10 @@
#include <hardware/sensors.h>
#include <hardware/hardware.h>
static const char* MULTI_HAL_CONFIG_FILE_PATH = "/vendor/etc/sensors/hals.conf";
static const char* MULTI_HAL_CONFIG_FILE_PATH = "/vendor/etc/sensors/_hals.conf";
// Depracated because system partition HAL config file does not satisfy treble requirements.
static const char* DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH = "/system/etc/sensors/hals.conf";
static const char* DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH = "/system/etc/sensors/_hals.conf";
struct sensors_module_t *get_multi_hal_module_info(void);