summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libs/androidfw/AssetManager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 370aaa2..f4ac254 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -330,6 +330,16 @@ bool AssetManager::addCommonOverlayPath(const String8& themePackagePath, int32_t
}
}
+ if (access(themePackagePath.string(), R_OK) != 0) {
+ ALOGW("failed to access file %s: %s\n", themePackagePath.string(), strerror(errno));
+ return false;
+ }
+
+ if (access(resApkPath.string(), R_OK) != 0) {
+ ALOGW("failed to access file %s: %s\n", resApkPath.string(), strerror(errno));
+ return false;
+ }
+
asset_path oap;
oap.path = themePackagePath;
oap.type = ::getFileType(themePackagePath.string());