diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2017-09-08 19:17:03 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2017-09-08 19:17:53 +0200 |
commit | 75aa615767457f2b62dda65b16ded41b0e6df11f (patch) | |
tree | 98a4c6f60f45fd9746ba7b122fd1a82ce9113aee /twinstall.cpp | |
parent | Update to AOSP 8.0 base (diff) | |
download | android_bootable_recovery-75aa615767457f2b62dda65b16ded41b0e6df11f.tar android_bootable_recovery-75aa615767457f2b62dda65b16ded41b0e6df11f.tar.gz android_bootable_recovery-75aa615767457f2b62dda65b16ded41b0e6df11f.tar.bz2 android_bootable_recovery-75aa615767457f2b62dda65b16ded41b0e6df11f.tar.lz android_bootable_recovery-75aa615767457f2b62dda65b16ded41b0e6df11f.tar.xz android_bootable_recovery-75aa615767457f2b62dda65b16ded41b0e6df11f.tar.zst android_bootable_recovery-75aa615767457f2b62dda65b16ded41b0e6df11f.zip |
Diffstat (limited to '')
-rw-r--r-- | twinstall.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/twinstall.cpp b/twinstall.cpp index 70eb7efe5..b0b6f3d17 100644 --- a/twinstall.cpp +++ b/twinstall.cpp @@ -60,7 +60,6 @@ extern "C" { } #define AB_OTA "payload_properties.txt" -//#define TW_NO_LEGACY_PROPS 1 static const char* properties_path = "/dev/__properties__"; static const char* properties_path_renamed = "/dev/__properties_kk__"; @@ -174,11 +173,13 @@ static int Run_Update_Binary(const char *path, ZipWrap *Zip, int* wipe_cache, zi FILE* child_data; #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"); + if (DataManager::GetIntValue("tw_enable_legacy_props") != 0) { + /* 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 @@ -259,12 +260,14 @@ static int Run_Update_Binary(const char *path, ZipWrap *Zip, int* wipe_cache, zi int waitrc = TWFunc::Wait_For_Child(pid, &status, "Updater"); #ifndef TW_NO_LEGACY_PROPS - /* Unset legacy properties */ - if (legacy_props_path_modified) { - if (switch_to_new_properties() != 0) { - LOGERR("Legacy property environment did not disable successfully. Legacy properties may still be in use.\n"); - } else { - LOGINFO("Legacy property environment disabled.\n"); + if (DataManager::GetIntValue("tw_enable_legacy_props") != 0) { + /* Unset legacy properties */ + if (legacy_props_path_modified) { + if (switch_to_new_properties() != 0) { + LOGERR("Legacy property environment did not disable successfully. Legacy properties may still be in use.\n"); + } else { + LOGINFO("Legacy property environment disabled.\n"); + } } } #endif |