Merge "Revert "Compress .so files for PackageManager to reclaim the space"" am: 67610047b0

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2159418

Change-Id: I2b911ededfee9cd73a2425b8e303b25cb219afdb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-07-20 17:34:51 +00:00
committed by Automerger Merge Worker

View File

@@ -36,7 +36,6 @@
#include <inttypes.h> #include <inttypes.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <linux/fs.h>
#include <memory> #include <memory>
@@ -254,16 +253,6 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr
return INSTALL_FAILED_CONTAINER_ERROR; return INSTALL_FAILED_CONTAINER_ERROR;
} }
// If a filesystem like f2fs supports per-file compression, set the compression bit before data
// writes
unsigned int flags;
if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1) {
ALOGE("Failed to call FS_IOC_GETFLAGS on %s: %s\n", localTmpFileName, strerror(errno));
} else if ((flags & FS_COMPR_FL) == 0) {
flags |= FS_COMPR_FL;
ioctl(fd, FS_IOC_SETFLAGS, &flags);
}
if (!zipFile->uncompressEntry(zipEntry, fd)) { if (!zipFile->uncompressEntry(zipEntry, fd)) {
ALOGE("Failed uncompressing %s to %s\n", fileName, localTmpFileName); ALOGE("Failed uncompressing %s to %s\n", fileName, localTmpFileName);
close(fd); close(fd);