diff --git a/healthd/Android.mk b/healthd/Android.mk index 27c985c46..a4469fc2f 100644 --- a/healthd/Android.mk +++ b/healthd/Android.mk @@ -6,6 +6,16 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := healthd_board_default.cpp LOCAL_MODULE := libhealthd.default LOCAL_CFLAGS := -Werror +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include +include $(BUILD_STATIC_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := BatteryMonitor.cpp +LOCAL_MODULE := libbatterymonitor +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include +LOCAL_STATIC_LIBRARIES := libutils include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) @@ -14,7 +24,6 @@ LOCAL_SRC_FILES := \ healthd.cpp \ healthd_mode_android.cpp \ healthd_mode_charger.cpp \ - BatteryMonitor.cpp \ BatteryPropertiesRegistrar.cpp LOCAL_MODULE := healthd @@ -35,7 +44,7 @@ endif LOCAL_C_INCLUDES := bootable/recovery -LOCAL_STATIC_LIBRARIES := libbatteryservice libbinder libminui libpng libz libutils libcutils liblog libm libc +LOCAL_STATIC_LIBRARIES := libbatterymonitor libbatteryservice libbinder libminui libpng libz libutils libcutils liblog libm libc ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) LOCAL_STATIC_LIBRARIES += libsuspend diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index 11ddd3e8a..8590a115c 100644 --- a/healthd/BatteryMonitor.cpp +++ b/healthd/BatteryMonitor.cpp @@ -16,8 +16,8 @@ #define LOG_TAG "healthd" -#include "healthd.h" -#include "BatteryMonitor.h" +#include +#include #include #include diff --git a/healthd/BatteryPropertiesRegistrar.cpp b/healthd/BatteryPropertiesRegistrar.cpp index d3a89d731..5d1fa52b1 100644 --- a/healthd/BatteryPropertiesRegistrar.cpp +++ b/healthd/BatteryPropertiesRegistrar.cpp @@ -26,7 +26,7 @@ #include #include -#include "healthd.h" +#include namespace android { diff --git a/healthd/healthd.cpp b/healthd/healthd.cpp index 85888c3ca..d9ac356e7 100644 --- a/healthd/healthd.cpp +++ b/healthd/healthd.cpp @@ -17,8 +17,8 @@ #define LOG_TAG "healthd" #define KLOG_LEVEL 6 -#include "healthd.h" -#include "BatteryMonitor.h" +#include +#include #include #include diff --git a/healthd/healthd_board_default.cpp b/healthd/healthd_board_default.cpp index ed4ddb410..eb55773de 100644 --- a/healthd/healthd_board_default.cpp +++ b/healthd/healthd_board_default.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include +#include void healthd_board_init(struct healthd_config*) { diff --git a/healthd/healthd_mode_android.cpp b/healthd/healthd_mode_android.cpp index 0a64099c3..323ef52fd 100644 --- a/healthd/healthd_mode_android.cpp +++ b/healthd/healthd_mode_android.cpp @@ -16,7 +16,7 @@ #define LOG_TAG "healthd-android" -#include "healthd.h" +#include #include "BatteryPropertiesRegistrar.h" #include diff --git a/healthd/healthd_mode_charger.cpp b/healthd/healthd_mode_charger.cpp index 46bad4ef9..58466263a 100644 --- a/healthd/healthd_mode_charger.cpp +++ b/healthd/healthd_mode_charger.cpp @@ -46,7 +46,7 @@ #include "minui/minui.h" -#include "healthd.h" +#include char *locale; diff --git a/healthd/BatteryMonitor.h b/healthd/include/healthd/BatteryMonitor.h similarity index 98% rename from healthd/BatteryMonitor.h rename to healthd/include/healthd/BatteryMonitor.h index 600107308..31c4e0920 100644 --- a/healthd/BatteryMonitor.h +++ b/healthd/include/healthd/BatteryMonitor.h @@ -22,7 +22,7 @@ #include #include -#include "healthd.h" +#include namespace android { diff --git a/healthd/healthd.h b/healthd/include/healthd/healthd.h similarity index 100% rename from healthd/healthd.h rename to healthd/include/healthd/healthd.h