recovery: Move bldrmsg offset symbols to bootloader_message.cpp
* bootloader_message.cpp is the only file using
BOOTLOADER_MESSAGE_OFFSET_IN_MISC and WIPE_PACKAGE_OFFSET_IN_MISC,
so we can move their definitions to the cpp.
This prevents the need to set BOARD_RECOVERY_BLDRMSG_OFFSET
in every module that includes the header.
* Global cflags are no longer supported Oreo and up,
so set the BOARD_RECOVERY_BLDRMSG_OFFSET via make variable
* Simplify logic, always set BOARD_RECOVERY_BLDRMSG_OFFSET.
Change-Id: I2b902bcce7f5ca13472e0ac30ac01b4991294dbe
diff --git a/bootloader_message_twrp/Android.mk b/bootloader_message_twrp/Android.mk
index e7a3ea0..932cd04 100644
--- a/bootloader_message_twrp/Android.mk
+++ b/bootloader_message_twrp/Android.mk
@@ -31,5 +31,10 @@
ifeq ($(TW_IGNORE_MISC_WIPE_DATA), true)
LOCAL_CFLAGS += -DIGNORE_MISC_WIPE_DATA
endif
+ifeq ($(BOOTLOADER_MESSAGE_OFFSET),)
+ LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=0
+else
+ LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOOTLOADER_MESSAGE_OFFSET)
+endif
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)