summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetManager.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2016-05-19 18:25:28 -0700
committerAdam Lesinski <adamlesinski@google.com>2016-05-20 15:04:09 -0700
commit76da37e1cf5c1381d9ccbaca86463fca52bd40f5 (patch)
tree1f81253db8a6e991f23fc30f5b71f88952100565 /libs/androidfw/AssetManager.cpp
parentdf9dee869c9efa18619b28691c88415b4f115df7 (diff)
Performance improvements in AssetManager
Change the implementation of getLocales() to iterate the set of configurations using a templated method, instead of using the result of getConfigurations(). Also remove the check for AndroidManifest.xml when adding an asset path. This is unneccessary. Bug:28625993 Change-Id: I16de5da598d0c371421d1dc8eee054dce9baf53a
Diffstat (limited to 'libs/androidfw/AssetManager.cpp')
-rw-r--r--libs/androidfw/AssetManager.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 715c875d064d..f50cff4387d2 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -66,7 +66,6 @@ static const char* kAssetsRoot = "assets";
static const char* kAppZipName = NULL; //"classes.jar";
static const char* kSystemAssets = "framework/framework-res.apk";
static const char* kResourceCache = "resource-cache";
-static const char* kAndroidManifest = "AndroidManifest.xml";
static const char* kExcludeExtension = ".EXCLUDE";
@@ -203,16 +202,6 @@ bool AssetManager::addAssetPath(
ALOGV("In %p Asset %s path: %s", this,
ap.type == kFileTypeDirectory ? "dir" : "zip", ap.path.string());
- // Check that the path has an AndroidManifest.xml
- Asset* manifestAsset = const_cast<AssetManager*>(this)->openNonAssetInPathLocked(
- kAndroidManifest, Asset::ACCESS_BUFFER, ap);
- if (manifestAsset == NULL) {
- // This asset path does not contain any resources.
- delete manifestAsset;
- return false;
- }
- delete manifestAsset;
-
ap.isSystemAsset = isSystemAsset;
mAssetPaths.add(ap);