Merge "Make calls to yield() explicit"
diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
index be82879..0eb999f 100644
--- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
+++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
@@ -260,6 +260,13 @@
return INSTALL_FAILED_CONTAINER_ERROR;
}
+ if (fsync(fd) < 0) {
+ ALOGE("Coulnd't fsync temporary file name: %s: %s\n", localTmpFileName, strerror(errno));
+ close(fd);
+ unlink(localTmpFileName);
+ return INSTALL_FAILED_INTERNAL_ERROR;
+ }
+
close(fd);
// Set the modification time for this file to the ZIP's mod time.