Merge up to android-8.1.0_r1 and fix conflicts
Change-Id: I2dc060134d15ec9f015a606cb24ef8276f6af1fc
diff --git a/gui/pages.cpp b/gui/pages.cpp
index 1199a28..a3a1df3 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -1370,13 +1370,19 @@
tw_h_offset = 0;
if (!TWFunc::Path_Exists(package))
return -1;
+#ifdef USE_MINZIP
if (sysMapFile(package.c_str(), &map) != 0) {
+#else
+ if (!map.MapFile(package)) {
+#endif
LOGERR("Failed to map '%s'\n", package.c_str());
goto error;
}
if (!zip.Open(package.c_str(), &map)) {
LOGERR("Unable to open zip archive '%s'\n", package.c_str());
+#ifdef USE_MINZIP
sysReleaseMap(&map);
+#endif
goto error;
}
ctx.zip = &zip;
@@ -1418,7 +1424,9 @@
if (ctx.zip) {
ctx.zip->Close();
+#ifdef USE_MINZIP
sysReleaseMap(&map);
+#endif
}
return ret;
@@ -1426,7 +1434,9 @@
// Sometimes we get here without a real error
if (ctx.zip) {
ctx.zip->Close();
+#ifdef USE_MINZIP
sysReleaseMap(&map);
+#endif
}
return -1;
}