summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-11-07 21:52:22 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-11-07 21:54:20 +0100
commit57e3587b8eff540401680500c24ff04b061c449e (patch)
tree4aea018f23b16105a304f5ef3dfc629fc13be118 /gui
parentDisable custom theme and fix png loading (diff)
downloadandroid_bootable_recovery-57e3587b8eff540401680500c24ff04b061c449e.tar
android_bootable_recovery-57e3587b8eff540401680500c24ff04b061c449e.tar.gz
android_bootable_recovery-57e3587b8eff540401680500c24ff04b061c449e.tar.bz2
android_bootable_recovery-57e3587b8eff540401680500c24ff04b061c449e.tar.lz
android_bootable_recovery-57e3587b8eff540401680500c24ff04b061c449e.tar.xz
android_bootable_recovery-57e3587b8eff540401680500c24ff04b061c449e.tar.zst
android_bootable_recovery-57e3587b8eff540401680500c24ff04b061c449e.zip
Diffstat (limited to 'gui')
-rw-r--r--gui/action.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 398ef503a..612e99026 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -218,33 +218,8 @@ int GUIAction::flash_zip(std::string filename, std::string pageName, const int s
if (!PartitionManager.Mount_By_Path(filename, true))
return -1;
- if (mzOpenZipArchive(filename.c_str(), &zip))
- {
- LOGERR("Unable to open zip file.\n");
- return -1;
- }
+ gui_changePage(pageName);
- // Check the zip to see if it has a custom installer theme
- const ZipEntry* twrp = mzFindZipEntry(&zip, "META-INF/teamwin/twrp.zip");
- if (twrp != NULL)
- {
- unlink("/tmp/twrp.zip");
- fd = creat("/tmp/twrp.zip", 0666);
- }
- if (fd >= 0 && twrp != NULL &&
- mzExtractZipEntryToFile(&zip, twrp, fd) &&
- !PageManager::LoadPackage("install", "/tmp/twrp.zip", "main"))
- {
- mzCloseZipArchive(&zip);
- PageManager::SelectPackage("install");
- gui_changePage("main");
- }
- else
- {
- // In this case, we just use the default page
- mzCloseZipArchive(&zip);
- gui_changePage(pageName);
- }
if (fd >= 0)
close(fd);
clau