diff options
-rw-r--r-- | Android.mk | 8 | ||||
-rw-r--r-- | recovery-persist.cpp | 4 | ||||
-rw-r--r-- | screen_ui.cpp | 4 | ||||
-rw-r--r-- | tests/Android.bp | 1 |
4 files changed, 5 insertions, 12 deletions
diff --git a/Android.mk b/Android.mk index 429c52dbf..9806d1091 100644 --- a/Android.mk +++ b/Android.mk @@ -63,14 +63,6 @@ LOCAL_REQUIRED_MODULES += \ endif endif -# e2fsck is needed for adb remount -R. -ifeq ($(BOARD_EXT4_SHARE_DUP_BLOCKS),true) -ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) -LOCAL_REQUIRED_MODULES += \ - e2fsck_static -endif -endif - # On A/B devices recovery-persist reads the recovery related file from the persist storage and # copies them into /data/misc/recovery. Then, for both A/B and non-A/B devices, recovery-persist # parses the last_install file and reports the embedded update metrics. Also, the last_install file diff --git a/recovery-persist.cpp b/recovery-persist.cpp index ebb42d223..e2a6699f6 100644 --- a/recovery-persist.cpp +++ b/recovery-persist.cpp @@ -158,7 +158,7 @@ int main(int argc, char **argv) { // Collects and reports the non-a/b update metrics from last_install; and removes the file // to avoid duplicate report. report_metrics_from_last_install(LAST_INSTALL_FILE_IN_CACHE); - if (unlink(LAST_INSTALL_FILE_IN_CACHE) == -1) { + if (access(LAST_INSTALL_FILE_IN_CACHE, F_OK) && unlink(LAST_INSTALL_FILE_IN_CACHE) == -1) { PLOG(ERROR) << "Failed to unlink " << LAST_INSTALL_FILE_IN_CACHE; } @@ -182,7 +182,7 @@ int main(int argc, char **argv) { // /data/misc/recovery from pmsg. Looks for the sideload history only. if (!has_cache) { report_metrics_from_last_install(LAST_INSTALL_FILE); - if (unlink(LAST_INSTALL_FILE) == -1) { + if (access(LAST_INSTALL_FILE, F_OK) && unlink(LAST_INSTALL_FILE) == -1) { PLOG(ERROR) << "Failed to unlink " << LAST_INSTALL_FILE; } } diff --git a/screen_ui.cpp b/screen_ui.cpp index 7fa41c4e4..6c00a2235 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -278,12 +278,12 @@ bool GraphicMenu::Validate(size_t max_width, size_t max_height, const GRSurface* bool GraphicMenu::ValidateGraphicSurface(size_t max_width, size_t max_height, int y, const GRSurface* surface) { if (!surface) { - fprintf(stderr, "Graphic surface can not be null"); + fprintf(stderr, "Graphic surface can not be null\n"); return false; } if (surface->pixel_bytes != 1 || surface->width != surface->row_bytes) { - fprintf(stderr, "Invalid graphic surface, pixel bytes: %zu, width: %zu row_bytes: %zu", + fprintf(stderr, "Invalid graphic surface, pixel bytes: %zu, width: %zu row_bytes: %zu\n", surface->pixel_bytes, surface->width, surface->row_bytes); return false; } diff --git a/tests/Android.bp b/tests/Android.bp index 1d6a056f6..898ed7d60 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -29,6 +29,7 @@ cc_defaults { "libcutils", "liblog", "libpng", + "libprocessgroup", "libselinux", "libz", "libziparchive", |