summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-04-01 20:37:14 +0200
committerGerrit Code Review <gerrit2@gerrit>2014-04-01 20:37:14 +0200
commit3d37eaed9da9a39799009b94c5a5379ef0935c5a (patch)
treec8844effca9882edd65b65046c8ac04197bfd7a2
parentMerge "Cleanup DU Get_Folder_Size function" into android-4.4 (diff)
parentAllow disabling legacy properties (diff)
downloadandroid_bootable_recovery-3d37eaed9da9a39799009b94c5a5379ef0935c5a.tar
android_bootable_recovery-3d37eaed9da9a39799009b94c5a5379ef0935c5a.tar.gz
android_bootable_recovery-3d37eaed9da9a39799009b94c5a5379ef0935c5a.tar.bz2
android_bootable_recovery-3d37eaed9da9a39799009b94c5a5379ef0935c5a.tar.lz
android_bootable_recovery-3d37eaed9da9a39799009b94c5a5379ef0935c5a.tar.xz
android_bootable_recovery-3d37eaed9da9a39799009b94c5a5379ef0935c5a.tar.zst
android_bootable_recovery-3d37eaed9da9a39799009b94c5a5379ef0935c5a.zip
-rw-r--r--Android.mk3
-rw-r--r--twinstall.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 46098cccf..7ac4d41d2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -272,6 +272,9 @@ ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),)
else ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),true)
LOCAL_CFLAGS += -DQCOM_RTC_FIX
endif
+ifneq ($(TW_NO_LEGACY_PROPS),)
+ LOCAL_CFLAGS += -DTW_NO_LEGACY_PROPS
+endif
ifneq ($(wildcard bionic/libc/include/sys/capability.h),)
LOCAL_CFLAGS += -DHAVE_CAPABILITIES
endif
diff --git a/twinstall.cpp b/twinstall.cpp
index 5b3242756..4b055a3aa 100644
--- a/twinstall.cpp
+++ b/twinstall.cpp
@@ -162,12 +162,14 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
}
mzCloseZipArchive(Zip);
+#ifndef TW_NO_LEGACY_PROPS
/* Set legacy properties */
if (switch_to_legacy_properties() != 0) {
LOGERR("Legacy property environment did not initialize successfully. Properties may not be detected.\n");
} else {
LOGINFO("Legacy property environment initialized.\n");
}
+#endif
pipe(pipe_fd);
@@ -230,6 +232,7 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
waitpid(pid, &status, 0);
+#ifndef TW_NO_LEGACY_PROPS
/* Unset legacy properties */
if (legacy_props_path_modified) {
if (switch_to_new_properties() != 0) {
@@ -238,6 +241,7 @@ static int Run_Update_Binary(const char *path, ZipArchive *Zip, int* wipe_cache)
LOGINFO("Legacy property environment disabled.\n");
}
}
+#endif
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
LOGERR("Error executing updater binary in zip '%s'\n", path);