From 57e3587b8eff540401680500c24ff04b061c449e Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 7 Nov 2014 14:52:22 -0600 Subject: Fix zip install We never used the feature for running a custom theme during zip install. We can re-implement this later if we like. For now, we will remove this feature until we are ready to make it work. Change-Id: Ice71b0b863c7ef17376e3f973d48b810be567c33 --- gui/action.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'gui') 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); -- cgit v1.2.3