RRO: prevent duplicate system overlays
System overlays, ie overlays with targetPackage="android", were loaded
twice, which caused all sorts of issues. Ensure they are only loaded
once, which will be during Zygote initialization.
Bug: 17765434
Change-Id: Ia5064045c77f713c58fb78adc3942f6af1abdc93
diff --git a/include/androidfw/AssetManager.h b/include/androidfw/AssetManager.h
index 99b3195..0cfd2b1 100644
--- a/include/androidfw/AssetManager.h
+++ b/include/androidfw/AssetManager.h
@@ -236,9 +236,11 @@
private:
struct asset_path
{
+ asset_path() : path(""), type(kFileTypeRegular), idmap(""), isSystemOverlay(false) {}
String8 path;
FileType type;
String8 idmap;
+ bool isSystemOverlay;
};
Asset* openInPathLocked(const char* fileName, AccessMode mode,