From 418954f50ff22300c6663f2be058ee440f31a032 Mon Sep 17 00:00:00 2001 From: atinm Date: Tue, 3 May 2011 00:26:33 -0400 Subject: Use RECOVERY_PRE_COMMAND before calling __reboot() recovery For the Power menu, frameworks/base/core/jni/android_os_Power.cpp#L180 already uses RECOVERY_PRE_COMMAND if TARGET_RECOVERY_PRE_COMMAND is defined in the BoardConfig.mk for a device to make a system() call before calling __reboot() for recovery. This commit adds the same thing to the other places that we know we are getting into recovery using __reboot(), namely, adb reboot recovery, the reboot binary and init in the case of errors. Change-Id: If0a9c7f22de2aa187c921b60ad5edd77b49e095d --- libcutils/Android.mk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcutils/Android.mk') diff --git a/libcutils/Android.mk b/libcutils/Android.mk index 5c227b6d..e98c6a8a 100644 --- a/libcutils/Android.mk +++ b/libcutils/Android.mk @@ -141,7 +141,12 @@ endif # !x86-atom endif # !sh endif # !arm +ifneq ($(TARGET_RECOVERY_PRE_COMMAND),) + LOCAL_CFLAGS += -DRECOVERY_PRE_COMMAND='$(TARGET_RECOVERY_PRE_COMMAND)' +endif + LOCAL_C_INCLUDES := $(libcutils_c_includes) $(KERNEL_HEADERS) + LOCAL_STATIC_LIBRARIES := liblog LOCAL_CFLAGS += $(targetSmpFlag) include $(BUILD_STATIC_LIBRARY) -- cgit v1.2.3