summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/AssetManager.cpp402
-rw-r--r--libs/androidfw/ResourceTypes.cpp474
-rw-r--r--libs/androidfw/tests/Android.mk15
-rw-r--r--libs/androidfw/tests/Idmap_test.cpp2
-rw-r--r--libs/androidfw/tests/PackageIdOverride_test.cpp60
-rw-r--r--libs/androidfw/tests/ThemesBags_test.cpp169
-rw-r--r--libs/androidfw/tests/ThemesIdmap_test.cpp133
-rw-r--r--libs/androidfw/tests/data/app/R.h9
-rw-r--r--libs/androidfw/tests/data/app/app_arsc.h101
-rw-r--r--libs/androidfw/tests/data/app/res/values/values.xml15
-rw-r--r--libs/androidfw/tests/data/bags/AndroidManifest.xml21
-rw-r--r--libs/androidfw/tests/data/bags/R.h26
-rw-r--r--libs/androidfw/tests/data/bags/bags_arsc.h88
-rwxr-xr-xlibs/androidfw/tests/data/bags/build6
-rw-r--r--libs/androidfw/tests/data/bags/res/values/values.xml24
-rw-r--r--libs/androidfw/tests/data/basic/res/drawable/drawable1.pngbin0 -> 69 bytes
-rw-r--r--libs/androidfw/tests/data/basic/res/values/values.xml3
-rw-r--r--libs/androidfw/tests/data/cm/app/AndroidManifest.xml19
-rw-r--r--libs/androidfw/tests/data/cm/app/R.h31
-rw-r--r--libs/androidfw/tests/data/cm/app/app_arsc.h91
-rwxr-xr-xlibs/androidfw/tests/data/cm/app/build6
-rw-r--r--libs/androidfw/tests/data/cm/app/res/values/values.xml22
-rw-r--r--libs/androidfw/tests/data/cm/bags/AndroidManifest.xml21
-rw-r--r--libs/androidfw/tests/data/cm/bags/R.h26
-rw-r--r--libs/androidfw/tests/data/cm/bags/bags_arsc.h88
-rwxr-xr-xlibs/androidfw/tests/data/cm/bags/build6
-rw-r--r--libs/androidfw/tests/data/cm/bags/res/values/values.xml24
-rw-r--r--libs/androidfw/tests/data/cm/basic/AndroidManifest.xml21
-rw-r--r--libs/androidfw/tests/data/cm/basic/R.h68
-rw-r--r--libs/androidfw/tests/data/cm/basic/basic_arsc.h194
-rwxr-xr-xlibs/androidfw/tests/data/cm/basic/build11
-rw-r--r--libs/androidfw/tests/data/cm/basic/res/drawable/drawable1.pngbin0 -> 69 bytes
-rw-r--r--libs/androidfw/tests/data/cm/basic/res/layout-fr-sw600dp/main.xml3
-rw-r--r--libs/androidfw/tests/data/cm/basic/res/layout/main.xml3
-rw-r--r--libs/androidfw/tests/data/cm/basic/res/values-de/values.xml5
-rw-r--r--libs/androidfw/tests/data/cm/basic/res/values-fr/values.xml5
-rw-r--r--libs/androidfw/tests/data/cm/basic/res/values-sv/values.xml4
-rw-r--r--libs/androidfw/tests/data/cm/basic/res/values/values.xml29
-rw-r--r--libs/androidfw/tests/data/cm/basic/split_de_fr_arsc.h92
-rw-r--r--libs/androidfw/tests/data/cm/overlay/AndroidManifest.xml21
-rwxr-xr-xlibs/androidfw/tests/data/cm/overlay/build6
-rw-r--r--libs/androidfw/tests/data/cm/overlay/overlay_arsc.h103
-rw-r--r--libs/androidfw/tests/data/cm/overlay/res/drawable/drawable1.pngbin0 -> 69 bytes
-rw-r--r--libs/androidfw/tests/data/cm/overlay/res/values/values.xml12
-rw-r--r--libs/androidfw/tests/data/cm/override/AndroidManifest.xml21
-rw-r--r--libs/androidfw/tests/data/cm/override/R.h16
-rwxr-xr-xlibs/androidfw/tests/data/cm/override/build6
-rw-r--r--libs/androidfw/tests/data/cm/override/override_arsc.h53
-rw-r--r--libs/androidfw/tests/data/cm/override/res/values/values.xml4
-rw-r--r--libs/androidfw/tests/data/cm/system/AndroidManifest.xml19
-rw-r--r--libs/androidfw/tests/data/cm/system/R.h26
-rwxr-xr-xlibs/androidfw/tests/data/cm/system/build6
-rw-r--r--libs/androidfw/tests/data/cm/system/res/values/filler.xml168
-rw-r--r--libs/androidfw/tests/data/cm/system/res/values/themes.xml21
-rw-r--r--libs/androidfw/tests/data/cm/system/system_arsc.h538
-rw-r--r--libs/androidfw/tests/data/overlay/overlay_arsc.h86
-rw-r--r--libs/androidfw/tests/data/overlay/res/drawable/drawable1.pngbin0 -> 69 bytes
-rw-r--r--libs/androidfw/tests/data/overlay/res/values/values.xml4
-rw-r--r--libs/androidfw/tests/data/override/AndroidManifest.xml21
-rw-r--r--libs/androidfw/tests/data/override/R.h16
-rwxr-xr-xlibs/androidfw/tests/data/override/build6
-rw-r--r--libs/androidfw/tests/data/override/override_arsc.h53
-rw-r--r--libs/androidfw/tests/data/override/res/values/values.xml4
-rw-r--r--libs/androidfw/tests/data/system/R.h7
-rw-r--r--libs/androidfw/tests/data/system/res/values/filler.xml168
-rw-r--r--libs/androidfw/tests/data/system/res/values/themes.xml8
-rw-r--r--libs/androidfw/tests/data/system/system_arsc.h525
-rw-r--r--libs/hwui/Android.mk4
-rw-r--r--libs/hwui/FontRenderer.cpp8
-rw-r--r--libs/hwui/FontRenderer.h2
-rw-r--r--libs/hwui/OpenGLRenderer.cpp17
-rw-r--r--libs/hwui/PathCache.cpp7
-rw-r--r--libs/hwui/PathCache.h1
-rw-r--r--libs/hwui/SpotShadow.cpp2
-rw-r--r--libs/hwui/font/CacheTexture.cpp14
-rw-r--r--libs/hwui/font/Font.cpp2
-rw-r--r--libs/hwui/renderstate/RenderState.cpp4
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp5
-rw-r--r--libs/hwui/renderthread/CanvasContext.h2
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp17
-rw-r--r--libs/hwui/renderthread/RenderProxy.h3
-rw-r--r--libs/storage/IMountService.cpp18
82 files changed, 4048 insertions, 293 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 2dc1c96..1add6c3 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006 The Android Open Source Project
+ * This code has been modified. Portions copyright (C) 2010, T-Mobile USA, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -75,8 +76,13 @@ static const char* kDefaultVendor = "default";
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* kCMSDKAssets = "framework/org.cyanogenmod.platform-res.apk";
static const char* kAndroidManifest = "AndroidManifest.xml";
+static const int kComposedIconAsset = 128;
+
+#ifdef HAVE_ANDROID_OS
+static const char* kResourceCache = "resource-cache";
+#endif
static const char* kExcludeExtension = ".EXCLUDE";
@@ -90,35 +96,9 @@ const char* AssetManager::OVERLAY_DIR = "/vendor/overlay";
const char* AssetManager::TARGET_PACKAGE_NAME = "android";
const char* AssetManager::TARGET_APK_PATH = "/system/framework/framework-res.apk";
const char* AssetManager::IDMAP_DIR = "/data/resource-cache";
+const char* AssetManager::APK_EXTENSION = ".apk";
namespace {
- String8 idmapPathForPackagePath(const String8& pkgPath)
- {
- const char* root = getenv("ANDROID_DATA");
- LOG_ALWAYS_FATAL_IF(root == NULL, "ANDROID_DATA not set");
- String8 path(root);
- path.appendPath(kResourceCache);
-
- char buf[256]; // 256 chars should be enough for anyone...
- strncpy(buf, pkgPath.string(), 255);
- buf[255] = '\0';
- char* filename = buf;
- while (*filename && *filename == '/') {
- ++filename;
- }
- char* p = filename;
- while (*p) {
- if (*p == '/') {
- *p = '@';
- }
- ++p;
- }
- path.appendPath(filename);
- path.append("@idmap");
-
- return path;
- }
-
/*
* Like strdup(), but uses C++ "new" operator instead of malloc.
*/
@@ -152,7 +132,8 @@ int32_t AssetManager::getGlobalCount()
AssetManager::AssetManager(CacheMode cacheMode)
: mLocale(NULL), mVendor(NULL),
mResources(NULL), mConfig(new ResTable_config),
- mCacheMode(cacheMode), mCacheValid(false)
+ mBasePackageIndex(-1), mCacheMode(cacheMode),
+ mCacheValid(false)
{
int count = android_atomic_inc(&gCount) + 1;
if (kIsDebug) {
@@ -224,6 +205,11 @@ bool AssetManager::addAssetPath(const String8& path, int32_t* cookie)
mAssetPaths.add(ap);
+ if (mResources != NULL) {
+ size_t index = mAssetPaths.size() - 1;
+ appendPathToResTable(ap, &index);
+ }
+
// new paths are always added at the end
if (cookie) {
*cookie = static_cast<int32_t>(mAssetPaths.size());
@@ -237,19 +223,37 @@ bool AssetManager::addAssetPath(const String8& path, int32_t* cookie)
}
#endif
- if (mResources != NULL) {
- appendPathToResTable(ap);
- }
-
return true;
}
-bool AssetManager::addOverlayPath(const String8& packagePath, int32_t* cookie)
+/**
+ * packagePath: Path to the APK that contains our overlay
+ * cookie: Set by this method. The caller can use this cookie to refer to the asset path that has
+ * been added.
+ * resApkPath: Path to the overlay's processed and cached resources.
+ * targetPkgPath: Path to the APK we are trying to overlay
+ * prefixPath: This is the base path internal to the overlay APK.
+ * For example, if we have theme "com.redtheme.apk"
+ * with a launcher overlay then this theme will have a structure like this:
+ * assets/
+ * com.android.launcher/
+ * res/
+ * drawable/
+ * foo.png
+ * Our resources.arsc will reference foo.png's path as "res/drawable/foo.png"
+ * so we need "assets/com.android.launcher/" as a prefix
+ */
+bool AssetManager::addOverlayPath(const String8& idmapPath, const String8& overlayPackagePath,
+ int32_t* cookie, const String8& resApkPath, const String8& targetPkgPath,
+ const String8& prefixPath)
{
- const String8 idmapPath = idmapPathForPackagePath(packagePath);
-
AutoMutex _l(mLock);
+ ALOGV("overlayApkPath: %s, idmap Path: %s, resApkPath %s, targetPkgPath: %s",
+ overlayPackagePath.string(), idmapPath.string(),
+ resApkPath.string(),
+ targetPkgPath.string());
+
for (size_t i = 0; i < mAssetPaths.size(); ++i) {
if (mAssetPaths[i].idmap == idmapPath) {
*cookie = static_cast<int32_t>(i + 1);
@@ -273,9 +277,9 @@ bool AssetManager::addOverlayPath(const String8& packagePath, int32_t* cookie)
}
delete idmap;
- if (overlayPath != packagePath) {
+ if (overlayPath != overlayPackagePath) {
ALOGW("idmap file %s inconcistent: expected path %s does not match actual path %s\n",
- idmapPath.string(), packagePath.string(), overlayPath.string());
+ idmapPath.string(), overlayPackagePath.string(), overlayPath.string());
return false;
}
if (access(targetPath.string(), R_OK) != 0) {
@@ -295,32 +299,196 @@ bool AssetManager::addOverlayPath(const String8& packagePath, int32_t* cookie)
oap.path = overlayPath;
oap.type = ::getFileType(overlayPath.string());
oap.idmap = idmapPath;
+ oap.resApkPath = resApkPath;
#if 0
ALOGD("Overlay added: targetPath=%s overlayPath=%s idmapPath=%s\n",
targetPath.string(), overlayPath.string(), idmapPath.string());
#endif
+ oap.prefixPath = prefixPath; //ex: assets/com.foo.bar
mAssetPaths.add(oap);
*cookie = static_cast<int32_t>(mAssetPaths.size());
if (mResources != NULL) {
- appendPathToResTable(oap);
+ size_t index = mAssetPaths.size() - 1;
+ appendPathToResTable(oap, &index);
}
return true;
}
+bool AssetManager::addCommonOverlayPath(const String8& themePackagePath, int32_t* cookie,
+ const String8& resApkPath, const String8& prefixPath)
+{
+ AutoMutex _l(mLock);
+
+ ALOGV("themePackagePath: %s, resApkPath %s, prefixPath %s",
+ themePackagePath.string(), resApkPath.string(), prefixPath.string());
+
+ // Skip if we have it already.
+ for (size_t i = 0; i < mAssetPaths.size(); ++i) {
+ if (mAssetPaths[i].path == themePackagePath && mAssetPaths[i].resApkPath == resApkPath) {
+ *cookie = static_cast<int32_t>(i + 1);
+ return true;
+ }
+ }
+
+ 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());
+ oap.resApkPath = resApkPath;
+ oap.prefixPath = prefixPath;
+ mAssetPaths.add(oap);
+ *cookie = static_cast<int32_t>(mAssetPaths.size());
+
+ if (mResources != NULL) {
+ size_t index = mAssetPaths.size() - 1;
+ appendPathToResTable(oap, &index);
+ }
+
+ return true;
+}
+
+/*
+ * packagePath: Path to the APK that contains our icon assets
+ * cookie: Set by this method. The caller can use this cookie to refer to the added asset path.
+ * resApkPath: Path to the icon APK's processed and cached resources.
+ * prefixPath: This is the base path internal to the icon APK.
+ For example, if we have theme "com.redtheme.apk"
+ * assets/
+ * icons/
+ * res/
+ * drawable/
+ * foo.png
+ * Our restable will reference foo.png's path as "res/drawable/foo.png"
+ * so we need "assets/com.android.launcher/" as a prefix
+ * pkgIdOverride: The package id we want to give. This will overridet the id in the res table.
+ * This is necessary for legacy icon packs because they are compiled with the
+ * standard 7F package id.
+*/
+bool AssetManager::addIconPath(const String8& packagePath, int32_t* cookie,
+ const String8& resApkPath, const String8& prefixPath,
+ uint32_t pkgIdOverride)
+{
+ AutoMutex _l(mLock);
+
+ ALOGV("package path: %s, resApkPath %s, prefixPath %s",
+ packagePath.string(),
+ resApkPath.string(), prefixPath.string());
+
+ // Skip if we have it already.
+ for (size_t i = 0; i < mAssetPaths.size(); i++) {
+ if (mAssetPaths[i].path == packagePath && mAssetPaths[i].resApkPath == resApkPath) {
+ *cookie = static_cast<int32_t>(i + 1);
+ return true;
+ }
+ }
+
+ asset_path oap;
+ oap.path = packagePath;
+ oap.type = ::getFileType(packagePath.string());
+ oap.resApkPath = resApkPath;
+ oap.prefixPath = prefixPath;
+ oap.pkgIdOverride = pkgIdOverride;
+ mAssetPaths.add(oap);
+ *cookie = static_cast<int32_t>(mAssetPaths.size());
+
+ if (mResources != NULL) {
+ size_t index = mAssetPaths.size() - 1;
+ appendPathToResTable(oap, &index);
+ }
+
+ return true;
+}
+
+String8 AssetManager::getPkgName(const char *apkPath) {
+ String8 pkgName;
+
+ asset_path ap;
+ ap.type = kFileTypeRegular;
+ ap.path = String8(apkPath);
+
+ ResXMLTree tree;
+
+ Asset* manifestAsset = openNonAssetInPathLocked(kAndroidManifest, Asset::ACCESS_BUFFER, ap);
+ tree.setTo(manifestAsset->getBuffer(true),
+ manifestAsset->getLength());
+ tree.restart();
+
+ size_t len;
+ ResXMLTree::event_code_t code;
+ while ((code=tree.next()) != ResXMLTree::END_DOCUMENT && code != ResXMLTree::BAD_DOCUMENT) {
+ if (code != ResXMLTree::START_TAG) {
+ continue;
+ }
+ String8 tag(tree.getElementName(&len));
+ if (tag != "manifest") break; //Manifest does not start with <manifest>
+ size_t len;
+ ssize_t idx = tree.indexOfAttribute(NULL, "package");
+ const char16_t* str = tree.getAttributeStringValue(idx, &len);
+ pkgName = (str ? String8(str, len) : String8());
+
+ }
+
+ manifestAsset->close();
+ return pkgName;
+ }
+
+/**
+ * Returns the base package name as defined in the AndroidManifest.xml
+ */
+String8 AssetManager::getBasePackageName(uint32_t index)
+{
+ if (index >= mAssetPaths.size()) return String8::empty();
+
+ if (mBasePackageName.isEmpty() || mBasePackageIndex != index) {
+ mBasePackageName = getPkgName(mAssetPaths[index].path.string());
+ mBasePackageIndex = index;
+ }
+ return mBasePackageName;
+}
+
+String8 AssetManager::getOverlayResPath(const char* cachePath)
+{
+ String8 resPath(cachePath);
+ resPath.append("/");
+ resPath.append("resources");
+ resPath.append(AssetManager::APK_EXTENSION);
+ return resPath;
+}
+
bool AssetManager::createIdmap(const char* targetApkPath, const char* overlayApkPath,
- uint32_t targetCrc, uint32_t overlayCrc, uint32_t** outData, size_t* outSize)
+ const char *cache_path, uint32_t targetCrc, uint32_t overlayCrc,
+ time_t targetMtime, time_t overlayMtime,
+ uint32_t** outData, size_t* outSize)
{
AutoMutex _l(mLock);
const String8 paths[2] = { String8(targetApkPath), String8(overlayApkPath) };
ResTable tables[2];
+ //Our overlay APK might use an external restable
+ String8 resPath = getOverlayResPath(cache_path);
+
for (int i = 0; i < 2; ++i) {
asset_path ap;
ap.type = kFileTypeRegular;
ap.path = paths[i];
- Asset* ass = openNonAssetInPathLocked("resources.arsc", Asset::ACCESS_BUFFER, ap);
+ Asset* ass;
+ if (i == 1 && access(resPath.string(), R_OK) != -1) {
+ ap.path = resPath;
+ ass = openNonAssetInPathLocked("resources.arsc", Asset::ACCESS_BUFFER, ap);
+ } else {
+ ass = openNonAssetInPathLocked("resources.arsc", Asset::ACCESS_BUFFER, ap);
+ }
if (ass == NULL) {
ALOGW("failed to find resources.arsc in %s\n", ap.path.string());
return false;
@@ -328,7 +496,7 @@ bool AssetManager::createIdmap(const char* targetApkPath, const char* overlayApk
tables[i].add(ass);
}
- return tables[0].createIdmap(tables[1], targetCrc, overlayCrc,
+ return tables[0].createIdmap(tables[1], targetCrc, overlayCrc, targetMtime, overlayMtime,
targetApkPath, overlayApkPath, (void**)outData, outSize) == NO_ERROR;
}
@@ -340,7 +508,10 @@ bool AssetManager::addDefaultAssets()
String8 path(root);
path.appendPath(kSystemAssets);
- return addAssetPath(path, NULL);
+ String8 pathCM(root);
+ pathCM.appendPath(kCMSDKAssets);
+
+ return addAssetPath(path, NULL) & addAssetPath(pathCM, NULL);
}
int32_t AssetManager::nextAssetPath(const int32_t cookie) const
@@ -518,6 +689,10 @@ Asset* AssetManager::open(const char* fileName, AccessMode mode)
i--;
ALOGV("Looking for asset '%s' in '%s'\n",
assetName.string(), mAssetPaths.itemAt(i).path.string());
+
+ // Skip theme/icon attached assets
+ if (mAssetPaths.itemAt(i).prefixPath.length() > 0) continue;
+
Asset* pAsset = openNonAssetInPathLocked(assetName.string(), mode, mAssetPaths.itemAt(i));
if (pAsset != NULL) {
return pAsset != kExcludedAsset ? pAsset : NULL;
@@ -551,6 +726,10 @@ Asset* AssetManager::openNonAsset(const char* fileName, AccessMode mode, int32_t
while (i > 0) {
i--;
ALOGV("Looking for non-asset '%s' in '%s'\n", fileName, mAssetPaths.itemAt(i).path.string());
+
+ // Skip theme/icon attached assets
+ if (mAssetPaths.itemAt(i).prefixPath.length() > 0) continue;
+
Asset* pAsset = openNonAssetInPathLocked(
fileName, mode, mAssetPaths.itemAt(i));
if (pAsset != NULL) {
@@ -581,6 +760,16 @@ Asset* AssetManager::openNonAsset(const int32_t cookie, const char* fileName, Ac
if (pAsset != NULL) {
return pAsset != kExcludedAsset ? pAsset : NULL;
}
+ } else if ((size_t)cookie == kComposedIconAsset) {
+ asset_path ap;
+ String8 path(fileName);
+ ap.type = kFileTypeDirectory;
+ ap.path = path.getPathDir();
+ Asset* pAsset = openNonAssetInPathLocked(
+ path.getPathLeaf().string(), mode, ap);
+ if (pAsset != NULL) {
+ return pAsset;
+ }
}
return NULL;
@@ -610,7 +799,7 @@ FileType AssetManager::getFileType(const char* fileName)
return kFileTypeRegular;
}
-bool AssetManager::appendPathToResTable(const asset_path& ap) const {
+bool AssetManager::appendPathToResTable(const asset_path& ap, size_t* entryIdx) const {
// skip those ap's that correspond to system overlays
if (ap.isSystemOverlay) {
return true;
@@ -622,17 +811,20 @@ bool AssetManager::appendPathToResTable(const asset_path& ap) const {
bool onlyEmptyResources = true;
MY_TRACE_BEGIN(ap.path.string());
Asset* idmap = openIdmapLocked(ap);
- size_t nextEntryIdx = mResources->getTableCount();
ALOGV("Looking for resource asset in '%s'\n", ap.path.string());
- if (ap.type != kFileTypeDirectory) {
- if (nextEntryIdx == 0) {
+ if (!ap.resApkPath.isEmpty()) {
+ // Avoid using prefix path in this case since the compiled resApk will simply have resources.arsc in it
+ ass = const_cast<AssetManager*>(this)->openNonAssetInPathLocked("resources.arsc", Asset::ACCESS_BUFFER, ap, false);
+ shared = false;
+ } else if (ap.type != kFileTypeDirectory) {
+ if (*entryIdx == 0) {
// The first item is typically the framework resources,
// which we want to avoid parsing every time.
sharedRes = const_cast<AssetManager*>(this)->
mZipSet.getZipResourceTable(ap.path);
if (sharedRes != NULL) {
// skip ahead the number of system overlay packages preloaded
- nextEntryIdx = sharedRes->getTableCount();
+ *entryIdx += sharedRes->getTableCount() - 1;
}
}
if (sharedRes == NULL) {
@@ -650,20 +842,20 @@ bool AssetManager::appendPathToResTable(const asset_path& ap) const {
}
}
- if (nextEntryIdx == 0 && ass != NULL) {
+ if (*entryIdx == 0 && ass != NULL) {
// If this is the first resource table in the asset
// manager, then we are going to cache it so that we
// can quickly copy it out for others.
ALOGV("Creating shared resources for %s", ap.path.string());
sharedRes = new ResTable();
- sharedRes->add(ass, idmap, nextEntryIdx + 1, false);
+ sharedRes->add(ass, idmap, *entryIdx + 1, false, ap.pkgIdOverride);
#ifdef HAVE_ANDROID_OS
const char* data = getenv("ANDROID_DATA");
LOG_ALWAYS_FATAL_IF(data == NULL, "ANDROID_DATA not set");
String8 overlaysListPath(data);
overlaysListPath.appendPath(kResourceCache);
overlaysListPath.appendPath("overlays.list");
- addSystemOverlays(overlaysListPath.string(), ap.path, sharedRes, nextEntryIdx);
+ addSystemOverlays(overlaysListPath.string(), ap.path, sharedRes, *entryIdx);
#endif
sharedRes = const_cast<AssetManager*>(this)->
mZipSet.setZipResourceTable(ap.path, sharedRes);
@@ -685,7 +877,7 @@ bool AssetManager::appendPathToResTable(const asset_path& ap) const {
mResources->add(sharedRes);
} else {
ALOGV("Parsing resources for %s", ap.path.string());
- mResources->add(ass, idmap, nextEntryIdx + 1, !shared);
+ mResources->add(ass, idmap, *entryIdx + 1, !shared, ap.pkgIdOverride);
}
onlyEmptyResources = false;
@@ -694,7 +886,7 @@ bool AssetManager::appendPathToResTable(const asset_path& ap) const {
}
} else {
ALOGV("Installing empty resources in to table %p\n", mResources);
- mResources->addEmpty(nextEntryIdx + 1);
+ mResources->addEmpty(*entryIdx + 1);
}
if (idmap != NULL) {
@@ -734,7 +926,7 @@ const ResTable* AssetManager::getResTable(bool required) const
bool onlyEmptyResources = true;
const size_t N = mAssetPaths.size();
for (size_t i=0; i<N; i++) {
- bool empty = appendPathToResTable(mAssetPaths.itemAt(i));
+ bool empty = appendPathToResTable(mAssetPaths.itemAt(i), &i);
onlyEmptyResources = onlyEmptyResources && empty;
}
@@ -811,7 +1003,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList,
if (oass != NULL) {
Asset* oidmap = openIdmapLocked(oap);
offset++;
- sharedRes->add(oass, oidmap, offset + 1, false);
+ sharedRes->add(oass, oidmap, offset + 1, false, oap.pkgIdOverride);
const_cast<AssetManager*>(this)->mAssetPaths.add(oap);
const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
}
@@ -819,6 +1011,32 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList,
fclose(fin);
}
+bool AssetManager::removeOverlayPath(const String8& packageName, int32_t cookie)
+{
+ AutoMutex _l(mLock);
+
+ const size_t which = ((size_t)cookie)-1;
+ if (which >= mAssetPaths.size()) {
+ ALOGE("cookie was larger than paths size");
+ return false;
+ }
+
+ const asset_path& oap = mAssetPaths.itemAt(which);
+ mZipSet.closeZip(oap.resApkPath);
+
+ mAssetPaths.removeAt(which);
+
+ ResTable* rt = mResources;
+ if (rt == NULL) {
+ ALOGE("Unable to remove overlayPath, ResTable must not be NULL");
+ return false;
+ }
+
+ rt->removeAssetsByCookie(packageName, cookie);
+
+ return true;
+}
+
const ResTable& AssetManager::getResources(bool required) const
{
const ResTable* rt = getResTable(required);
@@ -853,18 +1071,28 @@ void AssetManager::getLocales(Vector<String8>* locales) const
* Open a non-asset file as if it were an asset, searching for it in the
* specified app.
*
+ *
* Pass in a NULL values for "appName" if the common app directory should
* be used.
*/
Asset* AssetManager::openNonAssetInPathLocked(const char* fileName, AccessMode mode,
- const asset_path& ap)
+ const asset_path& ap, bool usePrefix)
{
Asset* pAsset = NULL;
+ // Append asset_path prefix if needed
+ const char* fileNameFinal = fileName;
+ String8 fileNameWithPrefix;
+ if (usePrefix && ap.prefixPath.length() > 0) {
+ fileNameWithPrefix.append(ap.prefixPath);
+ fileNameWithPrefix.append(fileName);
+ fileNameFinal = fileNameWithPrefix.string();
+ }
+
/* look at the filesystem on disk */
if (ap.type == kFileTypeDirectory) {
String8 path(ap.path);
- path.appendPath(fileName);
+ path.appendPath(fileNameFinal);
pAsset = openAssetFromFileLocked(path, mode);
@@ -882,24 +1110,45 @@ Asset* AssetManager::openNonAssetInPathLocked(const char* fileName, AccessMode m
/* look inside the zip file */
} else {
String8 path(fileName);
+ const char* zipPath;
/* check the appropriate Zip file */
- ZipFileRO* pZip = getZipFileLocked(ap);
- if (pZip != NULL) {
- //printf("GOT zip, checking NA '%s'\n", (const char*) path);
- ZipEntryRO entry = pZip->findEntryByName(path.string());
- if (entry != NULL) {
- //printf("FOUND NA in Zip file for %s\n", appName ? appName : kAppCommon);
- pAsset = openAssetFromZipLocked(pZip, entry, mode, path);
- pZip->releaseEntry(entry);
+ ZipFileRO* pZip;
+ ZipEntryRO entry;
+
+ if (!ap.resApkPath.isEmpty()) {
+ pZip = getZipFileLocked(ap.resApkPath);
+ if (pZip != NULL) {
+ //printf("GOT zip, checking NA '%s'\n", (const char*) path);
+ entry = pZip->findEntryByName(path.string());
+ if (entry != NULL) {
+ //printf("FOUND NA in Zip file for %s\n", appName ? appName : kAppCommon);
+ pAsset = openAssetFromZipLocked(pZip, entry, mode, path);
+ zipPath = ap.resApkPath.string();
+ }
+ }
+ }
+
+ if (pAsset == NULL) {
+ path.setTo(fileNameFinal);
+ pZip = getZipFileLocked(ap);
+ if (pZip != NULL) {
+ //printf("GOT zip, checking NA '%s'\n", (const char*) path);
+ ZipEntryRO entry = pZip->findEntryByName(path.string());
+ if (entry != NULL) {
+ //printf("FOUND NA in Zip file for %s\n", appName ? appName : kAppCommon);
+ pAsset = openAssetFromZipLocked(pZip, entry, mode, path);
+ pZip->releaseEntry(entry);
+ zipPath = ap.path.string();
+ }
}
}
if (pAsset != NULL) {
/* create a "source" name, for debug/display */
pAsset->setAssetSource(
- createZipSourceNameLocked(ZipSet::getPathName(ap.path.string()), String8(""),
- String8(fileName)));
+ createZipSourceNameLocked(ZipSet::getPathName(zipPath), String8(""),
+ String8(path.string())));
}
}
@@ -1111,9 +1360,14 @@ String8 AssetManager::createPathNameLocked(const asset_path& ap, const char* roo
*/
ZipFileRO* AssetManager::getZipFileLocked(const asset_path& ap)
{
+ return getZipFileLocked(ap.path);
+}
+
+ZipFileRO* AssetManager::getZipFileLocked(const String8& path)
+{
ALOGV("getZipFileLocked() in %p\n", this);
- return mZipSet.getZip(ap.path);
+ return mZipSet.getZip(path);
}
/*
@@ -1235,6 +1489,10 @@ AssetDir* AssetManager::openDir(const char* dirName)
while (i > 0) {
i--;
const asset_path& ap = mAssetPaths.itemAt(i);
+
+ // Skip theme/icon attached assets
+ if (ap.prefixPath.length() > 0) continue;
+
if (ap.type == kFileTypeRegular) {
ALOGV("Adding directory %s from zip %s", dirName, ap.path.string());
scanAndMergeZipLocked(pMergedInfo, ap, kAssetsRoot, dirName);
@@ -1776,6 +2034,10 @@ void AssetManager::fncScanLocked(SortedVector<AssetDir::FileInfo>* pMergedInfo,
while (i > 0) {
i--;
const asset_path& ap = mAssetPaths.itemAt(i);
+
+ // Skip theme/icon attached assets
+ if (ap.prefixPath.length() > 0) continue;
+
fncScanAndMergeDirLocked(pMergedInfo, ap, NULL, NULL, dirName);
if (mLocale != NULL)
fncScanAndMergeDirLocked(pMergedInfo, ap, mLocale, NULL, dirName);
@@ -2035,6 +2297,10 @@ ZipFileRO* AssetManager::ZipSet::getZip(const String8& path)
return zip->getZip();
}
+void AssetManager::ZipSet::closeZip(const String8& zip) {
+ closeZip(getIndex(zip));
+}
+
Asset* AssetManager::ZipSet::getZipResourceTableAsset(const String8& path)
{
int idx = getIndex(path);
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 62aabb1..5fe0d66 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -60,7 +60,15 @@ namespace android {
#define IDMAP_CURRENT_VERSION 0x00000001
#define APP_PACKAGE_ID 0x7f
+#define CMSDK_PACKAGE_ID 0x3f
#define SYS_PACKAGE_ID 0x01
+#define OVERLAY_APP_PACKAGE_ID 0x61
+#define OVERLAY_SYS_PACKAGE_ID 0x60
+#define OVERLAY_COMMON_PACKAGE_ID 0x5f
+
+// Define attributes from android.R.attr to protect from theme changes
+#define ATTR_WINDOW_NO_TITLE 0x01010056 // windowNoTitle
+#define ATTR_WINDOW_ACTION_BAR 0x010102cd // windowActionBar
static const bool kDebugStringPoolNoisy = false;
static const bool kDebugXMLNoisy = false;
@@ -734,7 +742,7 @@ const char16_t* ResStringPool::stringAt(size_t idx, size_t* u16len) const
}
#else
// We do not want to be in this case when actually running Android.
- ALOGW("CREATING STRING CACHE OF %zu bytes",
+ ALOGV("CREATING STRING CACHE OF %zu bytes",
static_cast<size_t>(mHeader->stringCount*sizeof(char16_t**)));
#endif
mCache = (char16_t**)calloc(mHeader->stringCount, sizeof(char16_t**));
@@ -3038,6 +3046,8 @@ struct ResTable::Entry {
StringPoolRef typeStr;
StringPoolRef keyStr;
+
+ bool isFromOverlay;
};
struct ResTable::Type
@@ -3057,7 +3067,8 @@ struct ResTable::Type
struct ResTable::Package
{
Package(ResTable* _owner, const Header* _header, const ResTable_package* _package)
- : owner(_owner), header(_header), package(_package), typeIdOffset(0) {
+ : owner(_owner), header(_header), package(_package), typeIdOffset(0),
+ pkgIdOverride(0) {
if (dtohs(package->header.headerSize) == sizeof(package)) {
// The package structure is the same size as the definition.
// This means it contains the typeIdOffset field.
@@ -3073,6 +3084,7 @@ struct ResTable::Package
ResStringPool keyStrings;
size_t typeIdOffset;
+ uint32_t pkgIdOverride;
};
// A group of objects describing a particular resource package.
@@ -3087,6 +3099,7 @@ struct ResTable::PackageGroup
, largestTypeId(0)
, bags(NULL)
, dynamicRefTable(static_cast<uint8_t>(_id))
+ , overlayPackage(NULL)
{ }
~PackageGroup() {
@@ -3178,6 +3191,8 @@ struct ResTable::PackageGroup
// by having these tables in a per-package scope rather than
// per-package-group.
DynamicRefTable dynamicRefTable;
+
+ Package* overlayPackage;
};
struct ResTable::bag_set
@@ -3532,7 +3547,7 @@ ResTable::ResTable(const void* data, size_t size, const int32_t cookie, bool cop
{
memset(&mParams, 0, sizeof(mParams));
memset(mPackageMap, 0, sizeof(mPackageMap));
- addInternal(data, size, NULL, 0, cookie, copyData);
+ addInternal(data, size, NULL, 0, cookie, copyData, 0);
LOG_FATAL_IF(mError != NO_ERROR, "Error parsing resource table");
if (kDebugTableSuperNoisy) {
ALOGI("Creating ResTable %p\n", this);
@@ -3553,12 +3568,12 @@ inline ssize_t ResTable::getResourcePackageIndex(uint32_t resID) const
}
status_t ResTable::add(const void* data, size_t size, const int32_t cookie, bool copyData) {
- return addInternal(data, size, NULL, 0, cookie, copyData);
+ return addInternal(data, size, NULL, 0, cookie, copyData, 0);
}
status_t ResTable::add(const void* data, size_t size, const void* idmapData, size_t idmapDataSize,
- const int32_t cookie, bool copyData) {
- return addInternal(data, size, idmapData, idmapDataSize, cookie, copyData);
+ const int32_t cookie, bool copyData, const uint32_t pkgIdOverride) {
+ return addInternal(data, size, idmapData, idmapDataSize, cookie, copyData, pkgIdOverride);
}
status_t ResTable::add(Asset* asset, const int32_t cookie, bool copyData) {
@@ -3568,10 +3583,11 @@ status_t ResTable::add(Asset* asset, const int32_t cookie, bool copyData) {
return UNKNOWN_ERROR;
}
- return addInternal(data, static_cast<size_t>(asset->getLength()), NULL, 0, cookie, copyData);
+ return addInternal(data, static_cast<size_t>(asset->getLength()), NULL, 0, cookie, copyData, 0);
}
-status_t ResTable::add(Asset* asset, Asset* idmapAsset, const int32_t cookie, bool copyData) {
+status_t ResTable::add(Asset* asset, Asset* idmapAsset, const int32_t cookie, bool copyData,
+ const uint32_t pkgIdOverride) {
const void* data = asset->getBuffer(true);
if (data == NULL) {
ALOGW("Unable to get buffer of resource asset file");
@@ -3590,7 +3606,7 @@ status_t ResTable::add(Asset* asset, Asset* idmapAsset, const int32_t cookie, bo
}
return addInternal(data, static_cast<size_t>(asset->getLength()),
- idmapData, idmapSize, cookie, copyData);
+ idmapData, idmapSize, cookie, copyData, pkgIdOverride);
}
status_t ResTable::add(ResTable* src)
@@ -3644,7 +3660,7 @@ status_t ResTable::addEmpty(const int32_t cookie) {
}
status_t ResTable::addInternal(const void* data, size_t dataSize, const void* idmapData, size_t idmapDataSize,
- const int32_t cookie, bool copyData)
+ const int32_t cookie, bool copyData, const uint32_t pkgIdOverride)
{
if (!data) {
return NO_ERROR;
@@ -3747,7 +3763,11 @@ status_t ResTable::addInternal(const void* data, size_t dataSize, const void* id
return (mError=BAD_TYPE);
}
- if (parsePackage((ResTable_package*)chunk, header) != NO_ERROR) {
+ // Warning: If the pkg id will be overriden and there is more than one package in the
+ // resource table then the caller should make sure there are enough unique ids above
+ // pkgIdOverride.
+ uint32_t idOverride = (pkgIdOverride == 0) ? 0 : pkgIdOverride + curPackage;
+ if (parsePackage((ResTable_package*)chunk, header, idOverride) != NO_ERROR) {
return mError;
}
curPackage++;
@@ -4033,8 +4053,27 @@ void ResTable::unlock() const
mLock.unlock();
}
+// Protected attributes are not permitted to be themed. If a theme
+// does try to change a protected attribute it will be overriden
+// by the app's original value.
+const static uint32_t PROTECTED_ATTRS[] = {
+ ATTR_WINDOW_NO_TITLE,
+ ATTR_WINDOW_ACTION_BAR
+};
+
+bool ResTable::isProtectedAttr(uint32_t resID) const
+{
+ int length = sizeof(PROTECTED_ATTRS) / sizeof(PROTECTED_ATTRS[0]);
+ for(int i=0; i < length; i++) {
+ if (PROTECTED_ATTRS[i] == resID) {
+ return true;
+ }
+ }
+ return false;
+}
+
ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag,
- uint32_t* outTypeSpecFlags) const
+ uint32_t* outTypeSpecFlags, bool performMapping) const
{
if (mError != NO_ERROR) {
return mError;
@@ -4074,7 +4113,7 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag,
}
// First see if we've already computed this bag...
- if (grp->bags) {
+ if (grp->bags && performMapping) {
bag_set** typeSet = grp->bags->get(t);
if (typeSet) {
bag_set* set = typeSet[e];
@@ -4118,7 +4157,7 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag,
// Now collect all bag attributes
Entry entry;
- status_t err = getEntry(grp, t, e, &mParams, &entry);
+ status_t err = getEntry(grp, t, e, &mParams, &entry, performMapping);
if (err != NO_ERROR) {
return err;
}
@@ -4157,7 +4196,8 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag,
const bag_entry* parentBag;
uint32_t parentTypeSpecFlags = 0;
- const ssize_t NP = getBagLocked(resolvedParent, &parentBag, &parentTypeSpecFlags);
+ const ssize_t NP = getBagLocked(resolvedParent, &parentBag, &parentTypeSpecFlags,
+ (resolvedParent != resID || !entry.isFromOverlay));
const size_t NT = ((NP >= 0) ? NP : 0) + N;
set = (bag_set*)malloc(sizeof(bag_set)+sizeof(bag_entry)*NT);
if (set == NULL) {
@@ -4295,6 +4335,68 @@ ssize_t ResTable::getBagLocked(uint32_t resID, const bag_entry** outBag,
set->numAttrs = curEntry;
}
+ if (entry.isFromOverlay) {
+ const bag_entry* originalBag;
+ uint32_t originalTypeSpecFlags = 0;
+ const ssize_t NO = getBagLocked(resID, &originalBag,
+ &originalTypeSpecFlags, false);
+ if (NO <= 0) {
+ ALOGW("Failed to retrieve original bag for 0x%08x", resID);
+ }
+
+ // Now merge in the original attributes...
+ bag_entry* entries = (bag_entry*)(set+1);
+ size_t curEntry = 0;
+ for (int i = 0; i < NO; i++) {
+ const uint32_t newName = originalBag[i].map.name.ident;
+ bool isInside;
+ uint32_t oldName = 0;
+ curEntry = 0;
+
+ while ((isInside=(curEntry < set->numAttrs))
+ && (oldName=entries[curEntry].map.name.ident) < newName) {
+ curEntry++;
+ }
+
+ if ((!isInside) || oldName != newName) {
+ // This is a new attribute... figure out what to do with it.
+ // Need to alloc more memory...
+ size_t prevEntry = curEntry;
+ curEntry = set->availAttrs;
+ set->availAttrs++;
+ const size_t newAvail = set->availAttrs;
+ set = (bag_set*)realloc(set,
+ sizeof(bag_set)
+ + sizeof(bag_entry)*newAvail);
+ if (set == NULL) {
+ return NO_MEMORY;
+ }
+ entries = (bag_entry*)(set+1);
+ if (isInside) {
+ // Going in the middle, need to make space.
+ memmove(entries+prevEntry+1, entries+prevEntry,
+ sizeof(bag_entry)*(set->numAttrs-prevEntry));
+ }
+
+ bag_entry* cur = entries+curEntry;
+
+ cur->stringBlock = originalBag[i].stringBlock;
+ cur->map.name.ident = originalBag[i].map.name.ident;
+ cur->map.value = originalBag[i].map.value;
+ set->typeSpecFlags |= originalTypeSpecFlags;
+ set->numAttrs = set->availAttrs;
+ } else if (isProtectedAttr(newName)) {
+ // The attribute exists in both the original and the new theme bags,
+ // furthermore it is an attribute we don't wish themers to theme, so
+ // give our current themed bag the same value as the original
+ bag_entry* cur = entries+curEntry;
+ cur->stringBlock = originalBag[i].stringBlock;
+ cur->map.name.ident = originalBag[i].map.name.ident;
+ cur->map.value = originalBag[i].map.value;
+ }
+ }
+ }
+
// And this is it...
typeSet[e] = set;
if (set) {
@@ -5038,7 +5140,7 @@ bool ResTable::stringToValue(Res_value* outValue, String16* outString,
}
uint32_t packageId = Res_GETPACKAGE(rid) + 1;
- if (packageId != APP_PACKAGE_ID && packageId != SYS_PACKAGE_ID) {
+ if (isDynamicPackageId(packageId)) {
outValue->dataType = Res_value::TYPE_DYNAMIC_REFERENCE;
}
outValue->data = rid;
@@ -5059,7 +5161,7 @@ bool ResTable::stringToValue(Res_value* outValue, String16* outString,
outValue->data = rid;
outValue->dataType = Res_value::TYPE_DYNAMIC_REFERENCE;
return true;
- } else if (packageId == APP_PACKAGE_ID || packageId == SYS_PACKAGE_ID) {
+ } else if (!isDynamicPackageId(packageId)) {
// We accept packageId's generated as 0x01 in order to support
// building the android system resources
outValue->data = rid;
@@ -5188,6 +5290,13 @@ bool ResTable::stringToValue(Res_value* outValue, String16* outString,
identifierForName(name.string(), name.size(),
type.string(), type.size(),
package.string(), package.size(), &specFlags);
+// HACK
+// This allows themes to reference attributes that are app specific and
+// normally private. Only applies to aapt running on device not host
+// build systems.
+#ifdef HAVE_ANDROID_OS
+ enforcePrivate = false;
+#endif
if (rid != 0) {
if (enforcePrivate) {
if ((specFlags&ResTable_typeSpec::SPEC_PUBLIC) == 0) {
@@ -5792,7 +5901,8 @@ bool ResTable::getResourceFlags(uint32_t resID, uint32_t* outFlags) const {
status_t ResTable::getEntry(
const PackageGroup* packageGroup, int typeIndex, int entryIndex,
const ResTable_config* config,
- Entry* outEntry) const
+ Entry* outEntry,
+ const bool performMapping) const
{
const TypeList& typeList = packageGroup->types[typeIndex];
if (typeList.isEmpty()) {
@@ -5808,6 +5918,8 @@ status_t ResTable::getEntry(
ResTable_config bestConfig;
memset(&bestConfig, 0, sizeof(bestConfig));
+ bool currentTypeIsOverlay = false;
+
// Iterate over the Types of each package.
const size_t typeCount = typeList.size();
for (size_t i = 0; i < typeCount; i++) {
@@ -5815,11 +5927,11 @@ status_t ResTable::getEntry(
int realEntryIndex = entryIndex;
int realTypeIndex = typeIndex;
- bool currentTypeIsOverlay = false;
+ currentTypeIsOverlay = false;
// Runtime overlay packages provide a mapping of app resource
// ID to package resource ID.
- if (typeSpec->idmapEntries.hasEntries()) {
+ if (performMapping && typeSpec->idmapEntries.hasEntries()) {
uint16_t overlayEntryIndex;
if (typeSpec->idmapEntries.lookup(entryIndex, &overlayEntryIndex) != NO_ERROR) {
// No such mapping exists
@@ -5831,7 +5943,7 @@ status_t ResTable::getEntry(
}
if (static_cast<size_t>(realEntryIndex) >= typeSpec->entryCount) {
- ALOGW("For resource 0x%08x, entry index(%d) is beyond type entryCount(%d)",
+ ALOGV("For resource 0x%08x, entry index(%d) is beyond type entryCount(%d)",
Res_MAKEID(packageGroup->id - 1, typeIndex, entryIndex),
entryIndex, static_cast<int>(typeSpec->entryCount));
// We should normally abort here, but some legacy apps declare
@@ -5875,7 +5987,7 @@ status_t ResTable::getEntry(
// Check if this one is less specific than the last found. If so,
// we will skip it. We check starting with things we most care
// about to those we least care about.
- if (!thisConfig.isBetterThan(bestConfig, config)) {
+ if (!currentTypeIsOverlay && !thisConfig.isBetterThan(bestConfig, config)) {
if (!currentTypeIsOverlay || thisConfig.compare(bestConfig) != 0) {
continue;
}
@@ -5926,12 +6038,13 @@ status_t ResTable::getEntry(
outEntry->package = bestPackage;
outEntry->typeStr = StringPoolRef(&bestPackage->typeStrings, actualTypeIndex - bestPackage->typeIdOffset);
outEntry->keyStr = StringPoolRef(&bestPackage->keyStrings, dtohl(entry->key.index));
+ outEntry->isFromOverlay = currentTypeIsOverlay;
}
return NO_ERROR;
}
status_t ResTable::parsePackage(const ResTable_package* const pkg,
- const Header* const header)
+ const Header* const header, const uint32_t pkgIdOverride)
{
const uint8_t* base = (const uint8_t*)pkg;
status_t err = validate_chunk(&pkg->header, sizeof(*pkg) - sizeof(pkg->typeIdOffset),
@@ -5965,15 +6078,14 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
uint32_t id = dtohl(pkg->id);
KeyedVector<uint8_t, IdmapEntries> idmapEntries;
+ uint8_t targetPackageId = 0;
if (header->resourceIDMap != NULL) {
- uint8_t targetPackageId = 0;
status_t err = parseIdmap(header->resourceIDMap, header->resourceIDMapSize, &targetPackageId, &idmapEntries);
if (err != NO_ERROR) {
ALOGW("Overlay is broken");
return (mError=err);
}
- id = targetPackageId;
}
if (id >= 256) {
@@ -5984,11 +6096,17 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
id = mNextPackageId++;
}
+ if (pkgIdOverride != 0) {
+ ALOGV("Overriding pkg id %d with %d", id, pkgIdOverride);
+ id = pkgIdOverride;
+ }
+
PackageGroup* group = NULL;
Package* package = new Package(this, header, pkg);
if (package == NULL) {
return (mError=NO_MEMORY);
}
+ package->pkgIdOverride = pkgIdOverride;
err = package->typeStrings.setTo(base+dtohl(pkg->typeStrings),
header->dataEnd-(base+dtohl(pkg->typeStrings)));
@@ -6043,6 +6161,15 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
return (mError=err);
}
+ // Get the target group if this is an overlay
+ PackageGroup* targetGroup = NULL;
+ if (header->resourceIDMap != NULL) {
+ targetGroup = mPackageGroups.itemAt(mPackageMap[targetPackageId] - 1);
+ if (targetGroup != NULL) {
+ targetGroup->overlayPackage = package;
+ }
+ }
+
// Iterate through all chunks.
const ResChunk_header* chunk =
(const ResChunk_header*)(((const uint8_t*)pkg)
@@ -6092,16 +6219,12 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
if (newEntryCount > 0) {
uint8_t typeIndex = typeSpec->id - 1;
- ssize_t idmapIndex = idmapEntries.indexOfKey(typeSpec->id);
- if (idmapIndex >= 0) {
- typeIndex = idmapEntries[idmapIndex].targetTypeId() - 1;
- }
TypeList& typeList = group->types.editItemAt(typeIndex);
if (!typeList.isEmpty()) {
const Type* existingType = typeList[0];
- if (existingType->entryCount != newEntryCount && idmapIndex < 0) {
- ALOGW("ResTable_typeSpec entry count inconsistent: given %d, previously %d",
+ if (existingType->entryCount != newEntryCount) {
+ ALOGV("ResTable_typeSpec entry count inconsistent: given %d, previously %d",
(int) newEntryCount, (int) existingType->entryCount);
// We should normally abort here, but some legacy apps declare
// resources in the 'android' package (old bug in AAPT).
@@ -6112,11 +6235,23 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
t->typeSpec = typeSpec;
t->typeSpecFlags = (const uint32_t*)(
((const uint8_t*)typeSpec) + dtohs(typeSpec->header.headerSize));
- if (idmapIndex >= 0) {
- t->idmapEntries = idmapEntries[idmapIndex];
- }
typeList.add(t);
group->largestTypeId = max(group->largestTypeId, typeSpec->id);
+
+ // Add this type spec to the targetGroup
+ if (targetGroup != NULL) {
+ ssize_t idmapIndex = idmapEntries.indexOfKey(typeSpec->id);
+ if (idmapIndex >= 0) {
+ typeIndex = idmapEntries[idmapIndex].targetTypeId() - 1;
+ TypeList& typeList = targetGroup->types.editItemAt(typeIndex);
+ Type* t = new Type(header, package, newEntryCount);
+ t->idmapEntries = idmapEntries[idmapIndex];
+ t->typeSpec = typeSpec;
+ t->typeSpecFlags = (const uint32_t*)(
+ ((const uint8_t*)typeSpec) + dtohs(typeSpec->header.headerSize));
+ typeList.add(t);
+ }
+ }
} else {
ALOGV("Skipping empty ResTable_typeSpec for type %d", typeSpec->id);
}
@@ -6160,10 +6295,6 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
if (newEntryCount > 0) {
uint8_t typeIndex = type->id - 1;
- ssize_t idmapIndex = idmapEntries.indexOfKey(type->id);
- if (idmapIndex >= 0) {
- typeIndex = idmapEntries[idmapIndex].targetTypeId() - 1;
- }
TypeList& typeList = group->types.editItemAt(typeIndex);
if (typeList.isEmpty()) {
@@ -6191,6 +6322,30 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
ALOGI("Adding config to type %d: %s\n", type->id,
thisConfig.toString().string());
}
+
+ // Add this type to the targetGroup
+ if (targetGroup != NULL) {
+ ssize_t idmapIndex = idmapEntries.indexOfKey(type->id);
+ if (idmapIndex >= 0) {
+ typeIndex = idmapEntries[idmapIndex].targetTypeId() - 1;
+ TypeList& typeList = targetGroup->types.editItemAt(typeIndex);
+ if (typeList.isEmpty()) {
+ ALOGE("No TypeSpec for type %d", type->id);
+ return (mError=BAD_TYPE);
+ }
+ Type* t = typeList.editItemAt(typeList.size() - 1);
+ if (newEntryCount != t->entryCount) {
+ ALOGE("ResTable_type entry count inconsistent: given %d, previously %d",
+ (int)newEntryCount, (int)t->entryCount);
+ return (mError=BAD_TYPE);
+ }
+ if (t->package != package) {
+ ALOGE("No TypeSpec for type %d", type->id);
+ return (mError=BAD_TYPE);
+ }
+ t->configs.add(type);
+ }
+ }
} else {
ALOGV("Skipping empty ResTable_type for type %d", type->id);
}
@@ -6232,6 +6387,10 @@ DynamicRefTable::DynamicRefTable(uint8_t packageId)
// Reserved package ids
mLookupTable[APP_PACKAGE_ID] = APP_PACKAGE_ID;
mLookupTable[SYS_PACKAGE_ID] = SYS_PACKAGE_ID;
+ mLookupTable[CMSDK_PACKAGE_ID] = CMSDK_PACKAGE_ID;
+ mLookupTable[OVERLAY_APP_PACKAGE_ID] = OVERLAY_APP_PACKAGE_ID;
+ mLookupTable[OVERLAY_SYS_PACKAGE_ID] = OVERLAY_SYS_PACKAGE_ID;
+ mLookupTable[OVERLAY_COMMON_PACKAGE_ID] = OVERLAY_COMMON_PACKAGE_ID;
}
status_t DynamicRefTable::load(const ResTable_lib_header* const header)
@@ -6310,7 +6469,8 @@ status_t DynamicRefTable::lookupResourceId(uint32_t* resId) const {
uint32_t res = *resId;
size_t packageId = Res_GETPACKAGE(res) + 1;
- if (packageId == APP_PACKAGE_ID) {
+ if (packageId == APP_PACKAGE_ID || packageId == OVERLAY_APP_PACKAGE_ID ||
+ packageId == OVERLAY_SYS_PACKAGE_ID || packageId == OVERLAY_COMMON_PACKAGE_ID) {
// No lookup needs to be done, app package IDs are absolute.
return NO_ERROR;
}
@@ -6362,6 +6522,7 @@ struct IdmapTypeMap {
status_t ResTable::createIdmap(const ResTable& overlay,
uint32_t targetCrc, uint32_t overlayCrc,
+ time_t targetMtime, time_t overlayMtime,
const char* targetPath, const char* overlayPath,
void** outData, size_t* outSize) const
{
@@ -6379,8 +6540,10 @@ status_t ResTable::createIdmap(const ResTable& overlay,
KeyedVector<uint8_t, IdmapTypeMap> map;
- // overlaid packages are assumed to contain only one package group
- const PackageGroup* pg = mPackageGroups[0];
+ // Overlaid packages are assumed to contain only one package group or two package group
+ // as one is "system package(android)", and another is "application package". So we need
+ // to use the last package group to create idmap.
+ const PackageGroup* pg = mPackageGroups[mPackageGroups.size() - 1];
// starting size is header
*outSize = ResTable::IDMAP_HEADER_SIZE_BYTES;
@@ -6393,77 +6556,103 @@ status_t ResTable::createIdmap(const ResTable& overlay,
char16_t tmpName[sizeof(overlayPackageStruct->name)/sizeof(overlayPackageStruct->name[0])];
strcpy16_dtoh(tmpName, overlayPackageStruct->name, sizeof(overlayPackageStruct->name)/sizeof(overlayPackageStruct->name[0]));
const String16 overlayPackage(tmpName);
+ Package* pkg;
+ size_t typeCount;
+ uint32_t pkg_id;
+
+ const uint32_t groupCount = mPackageGroups.size();
+ for (int groupIdx = groupCount - 1; groupIdx >= 0; groupIdx--) {
+ pg = mPackageGroups[groupIdx];
+ pkg = pg->packages[0];
+ typeCount = pg->types.size();
+ pkg_id = pkg->package->id << 24;
+
+ for (size_t typeIndex = 0; typeIndex < typeCount; ++typeIndex) {
+ const TypeList& typeList = pg->types[typeIndex];
+ if (typeList.isEmpty()) {
+ continue;
+ }
- for (size_t typeIndex = 0; typeIndex < pg->types.size(); ++typeIndex) {
- const TypeList& typeList = pg->types[typeIndex];
- if (typeList.isEmpty()) {
- continue;
- }
+ const Type* typeConfigs = typeList[0];
+
+ IdmapTypeMap typeMap;
+ typeMap.overlayTypeId = -1;
+ typeMap.entryOffset = 0;
- const Type* typeConfigs = typeList[0];
+ for (size_t entryIndex = 0; entryIndex < typeConfigs->entryCount; ++entryIndex) {
+ uint32_t resID = Res_MAKEID(pg->id - 1, typeIndex, entryIndex);
+ resource_name resName;
+ if (!this->getResourceName(resID, false, &resName)) {
+ if (typeMap.entryMap.isEmpty()) {
+ typeMap.entryOffset++;
+ }
+ continue;
+ }
- IdmapTypeMap typeMap;
- typeMap.overlayTypeId = -1;
- typeMap.entryOffset = 0;
+ // check if resource type is "allowed", if not continue
+ String8 type8;
+ if (resName.type8 != NULL) {
+ type8 = String8(resName.type8, resName.typeLen);
+ } else {
+ type8 = String8(resName.type, resName.typeLen);
+ }
+ if (!isResTypeAllowed(type8.string())) {
+ if (typeMap.entryMap.isEmpty()) {
+ typeMap.entryOffset++;
+ }
+ continue;
+ }
- for (size_t entryIndex = 0; entryIndex < typeConfigs->entryCount; ++entryIndex) {
- uint32_t resID = Res_MAKEID(pg->id - 1, typeIndex, entryIndex);
- resource_name resName;
- if (!this->getResourceName(resID, false, &resName)) {
- if (typeMap.entryMap.isEmpty()) {
- typeMap.entryOffset++;
+ const String16 overlayType(resName.type, resName.typeLen);
+ const String16 overlayName(resName.name, resName.nameLen);
+ uint32_t overlayResID = overlay.identifierForName(overlayName.string(),
+ overlayName.size(),
+ overlayType.string(),
+ overlayType.size(),
+ overlayPackage.string(),
+ overlayPackage.size());
+ if (overlayResID == 0) {
+ if (typeMap.entryMap.isEmpty()) {
+ typeMap.entryOffset++;
+ }
+ continue;
+ } else {
+ overlayResID = pkg_id | (0x00ffffff & overlayResID);
}
- continue;
- }
- const String16 overlayType(resName.type, resName.typeLen);
- const String16 overlayName(resName.name, resName.nameLen);
- uint32_t overlayResID = overlay.identifierForName(overlayName.string(),
- overlayName.size(),
- overlayType.string(),
- overlayType.size(),
- overlayPackage.string(),
- overlayPackage.size());
- if (overlayResID == 0) {
- if (typeMap.entryMap.isEmpty()) {
- typeMap.entryOffset++;
+ if (typeMap.overlayTypeId == -1) {
+ typeMap.overlayTypeId = Res_GETTYPE(overlayResID) + 1;
}
- continue;
- }
- if (typeMap.overlayTypeId == -1) {
- typeMap.overlayTypeId = Res_GETTYPE(overlayResID) + 1;
- }
+ if (Res_GETTYPE(overlayResID) + 1 != static_cast<size_t>(typeMap.overlayTypeId)) {
+ ALOGE("idmap: can't mix type ids in entry map. Resource 0x%08x maps to 0x%08x"
+ " but entries should map to resources of type %02zx",
+ resID, overlayResID, typeMap.overlayTypeId);
+ return BAD_TYPE;
+ }
- if (Res_GETTYPE(overlayResID) + 1 != static_cast<size_t>(typeMap.overlayTypeId)) {
- ALOGE("idmap: can't mix type ids in entry map. Resource 0x%08x maps to 0x%08x"
- " but entries should map to resources of type %02zx",
- resID, overlayResID, typeMap.overlayTypeId);
- return BAD_TYPE;
+ if (typeMap.entryOffset + typeMap.entryMap.size() < entryIndex) {
+ // pad with 0xffffffff's (indicating non-existing entries) before adding this entry
+ size_t index = typeMap.entryMap.size();
+ size_t numItems = entryIndex - (typeMap.entryOffset + index);
+ if (typeMap.entryMap.insertAt(0xffffffff, index, numItems) < 0) {
+ return NO_MEMORY;
+ }
+ }
+ typeMap.entryMap.add(Res_GETENTRY(overlayResID));
}
- if (typeMap.entryOffset + typeMap.entryMap.size() < entryIndex) {
- // pad with 0xffffffff's (indicating non-existing entries) before adding this entry
- size_t index = typeMap.entryMap.size();
- size_t numItems = entryIndex - (typeMap.entryOffset + index);
- if (typeMap.entryMap.insertAt(0xffffffff, index, numItems) < 0) {
+ if (!typeMap.entryMap.isEmpty()) {
+ if (map.add(static_cast<uint8_t>(typeIndex), typeMap) < 0) {
return NO_MEMORY;
}
+ *outSize += (4 * sizeof(uint16_t)) + (typeMap.entryMap.size() * sizeof(uint32_t));
}
- typeMap.entryMap.add(Res_GETENTRY(overlayResID));
- }
-
- if (!typeMap.entryMap.isEmpty()) {
- if (map.add(static_cast<uint8_t>(typeIndex), typeMap) < 0) {
- return NO_MEMORY;
- }
- *outSize += (4 * sizeof(uint16_t)) + (typeMap.entryMap.size() * sizeof(uint32_t));
}
}
if (map.isEmpty()) {
ALOGW("idmap: no resources in overlay package present in base package");
- return UNKNOWN_ERROR;
}
if ((*outData = malloc(*outSize)) == NULL) {
@@ -6475,6 +6664,8 @@ status_t ResTable::createIdmap(const ResTable& overlay,
*data++ = htodl(IDMAP_CURRENT_VERSION);
*data++ = htodl(targetCrc);
*data++ = htodl(overlayCrc);
+ *data++ = htodl(targetMtime);
+ *data++ = htodl(overlayMtime);
const char* paths[] = { targetPath, overlayPath };
for (int j = 0; j < 2; ++j) {
char* p = (char*)data;
@@ -6531,14 +6722,107 @@ bool ResTable::getIdmapInfo(const void* idmap, size_t sizeBytes,
*pOverlayCrc = dtohl(map[3]);
}
if (pTargetPath) {
- pTargetPath->setTo(reinterpret_cast<const char*>(map + 4));
+ pTargetPath->setTo(reinterpret_cast<const char*>(map + 6));
}
if (pOverlayPath) {
- pOverlayPath->setTo(reinterpret_cast<const char*>(map + 4 + 256 / sizeof(uint32_t)));
+ pOverlayPath->setTo(reinterpret_cast<const char*>(map + 6 + 256 / sizeof(uint32_t)));
}
return true;
}
+void ResTable::removeAssetsByCookie(const String8& /* packageName */, int32_t cookie)
+{
+ mError = NO_ERROR;
+ size_t pgCount = mPackageGroups.size();
+ for (size_t pgIndex = 0; pgIndex < pgCount; pgIndex++) {
+ PackageGroup* pg = mPackageGroups[pgIndex];
+ size_t pkgCount = pg->packages.size();
+ size_t index = pkgCount;
+ for (size_t pkgIndex = 0; pkgIndex < pkgCount; pkgIndex++) {
+ const Package* pkg = pg->packages[pkgIndex];
+ if (pkg->header->cookie == cookie) {
+ index = pkgIndex;
+ break;
+ }
+ }
+ if (index < pkgCount) {
+ const Package* pkg = pg->packages[index];
+ uint32_t id = dtohl(pkg->package->id);
+ if (pkg->pkgIdOverride != 0) {
+ id = pkg->pkgIdOverride;
+ }
+ if (id != 0 && id < 256 && pkgCount == 1) {
+ mPackageMap[id] = 0;
+ }
+ // Check if this package is being reference in any other groups and remove it
+ size_t N = mPackageGroups.size();
+ for (size_t i = 0; i < N; i++) {
+ PackageGroup* grp = mPackageGroups.itemAt(i);
+ if (grp->overlayPackage == pkg) {
+ removeIdmappedTypesFromPackageGroup(grp);
+ grp->clearBagCache();
+ grp->overlayPackage = NULL;
+ }
+ }
+ if (pkgCount == 1) {
+ mPackageGroups.removeAt(pgIndex);
+ delete pg;
+ } else {
+ pg->packages.removeAt(index);
+ delete pkg;
+ }
+ break;
+ }
+ }
+ size_t N = mHeaders.size();
+ for (size_t i = 0; i < N; i++) {
+ Header* header = mHeaders[i];
+ if (header->cookie == cookie) {
+ if (header->ownedData != NULL) {
+ free(header->ownedData);
+ }
+ mHeaders.removeAt(i);
+ break;
+ }
+ }
+}
+
+bool ResTable::isResTypeAllowed(const char* type) const {
+ if (type == NULL) return false;
+ const char* allowedResources[] = { "color", "dimen", "drawable", "mipmap", "style", "anim" };
+ // ALLOWED_RESOURCE_COUNT should match the number of elements in allowedResources
+ const uint32_t ALLOWED_RESOURCE_COUNT = 6;
+ for (uint32_t i = 0; i < ALLOWED_RESOURCE_COUNT; i++) {
+ if (strstr(type, allowedResources[i]) != NULL) return true;
+ }
+ return false;
+}
+
+bool ResTable::isDynamicPackageId(const uint32_t pkgId) const {
+ return pkgId != APP_PACKAGE_ID && pkgId != SYS_PACKAGE_ID
+ && pkgId != OVERLAY_APP_PACKAGE_ID && pkgId != OVERLAY_SYS_PACKAGE_ID
+ && pkgId != OVERLAY_COMMON_PACKAGE_ID && pkgId != CMSDK_PACKAGE_ID;
+}
+
+status_t ResTable::removeIdmappedTypesFromPackageGroup(PackageGroup* packageGroup) const {
+ for (size_t idx = 0; idx < Res_MAXTYPE; idx++) {
+ const TypeList& typeList = packageGroup->types[idx];
+ if (!typeList.isEmpty()) {
+ TypeList& editTypeList = packageGroup->types.editItemAt(idx);
+ // Iterate over the Types of each package.
+ for (Vector<Type*>::iterator iter = editTypeList.begin();
+ iter != editTypeList.end();) {
+ Type* type = *iter;
+ if (type->idmapEntries.hasEntries()) {
+ iter = editTypeList.erase(iter);
+ } else {
+ ++iter;
+ }
+ }
+ }
+ }
+ return NO_ERROR;
+}
#define CHAR16_TO_CSTR(c16, len) (String8(String16(c16,len)).string())
diff --git a/libs/androidfw/tests/Android.mk b/libs/androidfw/tests/Android.mk
index a353575..5fd17cc 100644
--- a/libs/androidfw/tests/Android.mk
+++ b/libs/androidfw/tests/Android.mk
@@ -25,23 +25,17 @@ testFiles := \
ByteBucketArray_test.cpp \
Config_test.cpp \
ConfigLocale_test.cpp \
- Idmap_test.cpp \
+ PackageIdOverride_test.cpp \
ResTable_test.cpp \
Split_test.cpp \
TestHelpers.cpp \
Theme_test.cpp \
+ ThemesBags_test.cpp \
+ ThemesIdmap_test.cpp \
TypeWrappers_test.cpp \
ZipUtils_test.cpp
-androidfw_test_cflags := \
- -Wall \
- -Werror \
- -Wunused \
- -Wunreachable-code \
- -Wno-missing-field-initializers \
-# gtest is broken.
-androidfw_test_cflags += -Wno-unnamed-type-template-args
# ==========================================================
# Build the host tests: libandroidfw_tests
@@ -49,7 +43,7 @@ androidfw_test_cflags += -Wno-unnamed-type-template-args
include $(CLEAR_VARS)
LOCAL_MODULE := libandroidfw_tests
-LOCAL_CFLAGS := $(androidfw_test_cflags)
+
LOCAL_SRC_FILES := $(testFiles)
LOCAL_STATIC_LIBRARIES := \
libandroidfw \
@@ -67,7 +61,6 @@ ifneq ($(SDK_ONLY),true)
include $(CLEAR_VARS)
LOCAL_MODULE := libandroidfw_tests
-LOCAL_CFLAGS := $(androidfw_test_cflags)
LOCAL_SRC_FILES := $(testFiles) \
BackupData_test.cpp \
ObbFile_test.cpp \
diff --git a/libs/androidfw/tests/Idmap_test.cpp b/libs/androidfw/tests/Idmap_test.cpp
index f50c178..181a7cc 100644
--- a/libs/androidfw/tests/Idmap_test.cpp
+++ b/libs/androidfw/tests/Idmap_test.cpp
@@ -50,7 +50,7 @@ protected:
ASSERT_EQ(NO_ERROR, mTargetTable.add(basic_arsc, basic_arsc_len));
ASSERT_EQ(NO_ERROR, mOverlayTable.add(overlay_arsc, overlay_arsc_len));
char targetName[256] = "com.android.test.basic";
- ASSERT_EQ(NO_ERROR, mTargetTable.createIdmap(mOverlayTable, 0, 0,
+ ASSERT_EQ(NO_ERROR, mTargetTable.createIdmap(mOverlayTable, 0, 0, 0, 0,
targetName, targetName, &mData, &mDataSize));
}
diff --git a/libs/androidfw/tests/PackageIdOverride_test.cpp b/libs/androidfw/tests/PackageIdOverride_test.cpp
new file mode 100644
index 0000000..c1d645f
--- /dev/null
+++ b/libs/androidfw/tests/PackageIdOverride_test.cpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (C) 2014 The CyanogenMod Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <androidfw/ResourceTypes.h>
+
+#include <utils/String8.h>
+#include <utils/String16.h>
+#include "TestHelpers.h"
+#include "data/cm/override/R.h"
+
+#include <gtest/gtest.h>
+
+using namespace android;
+
+namespace {
+
+#include "data/cm/override/override_arsc.h"
+
+TEST(PackageIdOverrideTest, shouldOverridePackageId) {
+ const uint32_t pkgIdOverride = 0x42;
+ ResTable table;
+ ASSERT_EQ(NO_ERROR, table.add(override_arsc, override_arsc_len, NULL, 0, -1, false,
+ pkgIdOverride));
+
+ Res_value val;
+ // we should not be able to retrieve the resource using the build time package id
+ uint32_t resId = override::R::string::string1;
+ ssize_t block = table.getResource(resId, &val, false);
+ ASSERT_LT(block, 0);
+
+ // now make sure we can access the resource using the runtime package id
+ resId = (override::R::string::string1 & 0x00ffffff) | (pkgIdOverride << 24);
+ block = table.getResource(resId, &val, false);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_STRING, val.dataType);
+ const ResStringPool* pool = table.getTableStringBlock(block);
+ ASSERT_TRUE(pool != NULL);
+ ASSERT_LT(val.data, pool->size());
+
+ size_t strLen;
+ const char16_t* targetStr16 = pool->stringAt(val.data, &strLen);
+ ASSERT_TRUE(targetStr16 != NULL);
+ ASSERT_EQ(String16("string1"), String16(targetStr16, strLen));
+}
+
+}
diff --git a/libs/androidfw/tests/ThemesBags_test.cpp b/libs/androidfw/tests/ThemesBags_test.cpp
new file mode 100644
index 0000000..b1d7c19
--- /dev/null
+++ b/libs/androidfw/tests/ThemesBags_test.cpp
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <androidfw/ResourceTypes.h>
+
+#include <utils/String8.h>
+#include <utils/String16.h>
+#include "TestHelpers.h"
+#include "data/cm/system/R.h"
+#include "data/cm/app/R.h"
+#include "data/cm/bags/R.h"
+
+#include <gtest/gtest.h>
+
+using namespace android;
+
+namespace {
+
+/**
+ * Include a binary resource table.
+ *
+ * Package: android
+ */
+#include "data/cm/system/system_arsc.h"
+
+/**
+ * Include a binary resource table.
+ *
+ * Package: com.android.app
+ */
+#include "data/cm/app/app_arsc.h"
+
+/**
+ * Include a binary resource table.
+ * This table is an overlay.
+ *
+ * Package: com.android.test.bags
+ */
+#include "data/cm/bags/bags_arsc.h"
+
+enum { MAY_NOT_BE_BAG = false };
+
+class BagsTest : public ::testing::Test {
+protected:
+ virtual void SetUp() {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(app_arsc, app_arsc_len));
+ ASSERT_EQ(NO_ERROR, mOverlayTable.add(bags_arsc, bags_arsc_len));
+ char targetName[256] = "com.android.app";
+ ASSERT_EQ(NO_ERROR, mTargetTable.createIdmap(mOverlayTable, 0, 0, 0, 0,
+ targetName, targetName, &mData, &mDataSize));
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(system_arsc, system_arsc_len));
+ }
+
+ virtual void TearDown() {
+ free(mData);
+ }
+
+ ResTable mTargetTable;
+ ResTable mOverlayTable;
+ void* mData;
+ size_t mDataSize;
+};
+
+TEST_F(BagsTest, canLoadIdmap) {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(bags_arsc, bags_arsc_len, mData, mDataSize));
+}
+
+TEST_F(BagsTest, overlayOverridesStyleAttribute) {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(bags_arsc, bags_arsc_len, mData, mDataSize));
+
+ ResTable::Theme theme2(mTargetTable);
+ ASSERT_EQ(NO_ERROR, theme2.applyStyle(app::R::style::Theme_Two));
+
+ Res_value val;
+ ASSERT_GE(theme2.getAttribute(android::R::attr::background, &val), 0);
+ ASSERT_EQ(Res_value::TYPE_INT_COLOR_RGB8, val.dataType);
+ ASSERT_EQ(uint32_t(0xff0000ff), val.data);
+}
+
+TEST_F(BagsTest, overlayCanResolveReferencesToOwnPackage) {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(bags_arsc, bags_arsc_len, mData, mDataSize));
+
+ ResTable::Theme theme2(mTargetTable);
+ ASSERT_EQ(NO_ERROR, theme2.applyStyle(app::R::style::Theme_Two));
+
+ Res_value attr;
+ ssize_t block = theme2.getAttribute(android::R::attr::foreground, &attr);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_REFERENCE, attr.dataType);
+ ASSERT_EQ(uint32_t(bags::R::color::magenta), attr.data);
+ Res_value val;
+ block = mTargetTable.getResource(attr.data, &val, false);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_INT_COLOR_RGB8, val.dataType);
+ ASSERT_EQ(uint32_t(0xffff00ff), val.data);
+}
+
+TEST_F(BagsTest, overlayCanReferenceOwnStyle) {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(bags_arsc, bags_arsc_len, mData, mDataSize));
+
+ ResTable::Theme theme3(mTargetTable);
+ ASSERT_EQ(NO_ERROR, theme3.applyStyle(app::R::style::Theme_Three));
+
+ Res_value attr;
+ ssize_t block = theme3.getAttribute(android::R::attr::foreground, &attr);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_REFERENCE, attr.dataType);
+ ASSERT_EQ(uint32_t(bags::R::color::cyan), attr.data);
+ Res_value val;
+ block = mTargetTable.getResource(attr.data, &val, false);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_INT_COLOR_RGB8, val.dataType);
+ ASSERT_EQ(uint32_t(0xff00ffff), val.data);
+
+ // verify that we still get the parent attribute for background
+ block = theme3.getAttribute(android::R::attr::background, &attr);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_INT_COLOR_RGB8, attr.dataType);
+ ASSERT_EQ(uint32_t(0xffff0000), attr.data);
+}
+
+TEST_F(BagsTest, overlaidStyleContainsMissingAttributes) {
+ const uint32_t SOME_DIMEN_VALUE = 0x00003001;
+
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(bags_arsc, bags_arsc_len, mData, mDataSize));
+
+ ResTable::Theme theme(mTargetTable);
+ ASSERT_EQ(NO_ERROR, theme.applyStyle(app::R::style::Theme_Four));
+
+ // First let's make sure we have the themed style by checking the background attribute
+ Res_value attr;
+ ssize_t block = theme.getAttribute(android::R::attr::background, &attr);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_INT_COLOR_RGB8, attr.dataType);
+ ASSERT_EQ(uint32_t(0xffaabbcc), attr.data);
+
+ // Now check if the someDimen attribute in the parent was merged in correctly since the theme
+ // does not contain this attribute in the overlaid style
+ block = theme.getAttribute(android::R::attr::some_dimen, &attr);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_DIMENSION, attr.dataType);
+ ASSERT_EQ(SOME_DIMEN_VALUE, attr.data);
+}
+
+TEST_F(BagsTest, protectedAttributeNotOverlaid) {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(bags_arsc, bags_arsc_len, mData, mDataSize));
+
+ ResTable::Theme theme(mTargetTable);
+ ASSERT_EQ(NO_ERROR, theme.applyStyle(app::R::style::Theme_Two));
+ Res_value val;
+ ASSERT_GE(theme.getAttribute(android::R::attr::windowNoTitle, &val), 0);
+ ASSERT_EQ(Res_value::TYPE_INT_BOOLEAN, val.dataType);
+ ASSERT_NE(0, val.data);
+}
+
+}
diff --git a/libs/androidfw/tests/ThemesIdmap_test.cpp b/libs/androidfw/tests/ThemesIdmap_test.cpp
new file mode 100644
index 0000000..50f16c8
--- /dev/null
+++ b/libs/androidfw/tests/ThemesIdmap_test.cpp
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <androidfw/ResourceTypes.h>
+
+#include <utils/String8.h>
+#include <utils/String16.h>
+#include "TestHelpers.h"
+#include "data/cm/basic/R.h"
+
+#include <gtest/gtest.h>
+
+using namespace android;
+
+namespace {
+
+/**
+ * Include a binary resource table.
+ *
+ * Package: com.android.test.basic
+ */
+#include "data/cm/basic/basic_arsc.h"
+
+/**
+ * Include a binary resource table.
+ * This table is an overlay.
+ *
+ * Package: com.android.test.basic
+ */
+#include "data/cm/overlay/overlay_arsc.h"
+
+enum { MAY_NOT_BE_BAG = false };
+
+class IdmapTest : public ::testing::Test {
+protected:
+ virtual void SetUp() {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(basic_arsc, basic_arsc_len));
+ ASSERT_EQ(NO_ERROR, mOverlayTable.add(overlay_arsc, overlay_arsc_len));
+ char targetName[256] = "com.android.test.basic";
+ ASSERT_EQ(NO_ERROR, mTargetTable.createIdmap(mOverlayTable, 0, 0, 0, 0,
+ targetName, targetName, &mData, &mDataSize));
+ }
+
+ virtual void TearDown() {
+ free(mData);
+ }
+
+ ResTable mTargetTable;
+ ResTable mOverlayTable;
+ void* mData;
+ size_t mDataSize;
+};
+
+TEST_F(IdmapTest, canLoadIdmap) {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(overlay_arsc, overlay_arsc_len, mData, mDataSize));
+}
+
+TEST_F(IdmapTest, overlayOverridesResourceValue) {
+ Res_value val;
+ ssize_t block = mTargetTable.getResource(base::R::dimen::dimen1, &val, false);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_DIMENSION, val.dataType);
+ ASSERT_NE(val.data, 0);
+
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(overlay_arsc, overlay_arsc_len, mData, mDataSize));
+
+ Res_value newVal;
+ ssize_t newBlock = mTargetTable.getResource(base::R::dimen::dimen1, &newVal, false);
+ ASSERT_GE(newBlock, 0);
+ ASSERT_NE(block, newBlock);
+ ASSERT_EQ(Res_value::TYPE_DIMENSION, newVal.dataType);
+ ASSERT_NE(val.data, newVal.data);
+}
+
+TEST_F(IdmapTest, overlaidResourceHasSameName) {
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(overlay_arsc, overlay_arsc_len, mData, mDataSize));
+
+ ResTable::resource_name resName;
+ ASSERT_TRUE(mTargetTable.getResourceName(base::R::drawable::drawable1, false, &resName));
+
+ ASSERT_TRUE(resName.package != NULL);
+ ASSERT_TRUE(resName.type != NULL);
+ ASSERT_TRUE(resName.name != NULL);
+
+ EXPECT_EQ(String16("com.android.test.basic"), String16(resName.package, resName.packageLen));
+ EXPECT_EQ(String16("drawable"), String16(resName.type, resName.typeLen));
+ EXPECT_EQ(String16("drawable1"), String16(resName.name, resName.nameLen));
+}
+
+TEST_F(IdmapTest, overlayDoesNotOverlayStringResource) {
+ Res_value val;
+ ssize_t block = mTargetTable.getResource(base::R::string::test2, &val, false);
+ ASSERT_GE(block, 0);
+ ASSERT_EQ(Res_value::TYPE_STRING, val.dataType);
+ const ResStringPool* pool = mTargetTable.getTableStringBlock(block);
+ ASSERT_TRUE(pool != NULL);
+ ASSERT_LT(val.data, pool->size());
+
+ size_t strLen;
+ const char16_t* targetStr16 = pool->stringAt(val.data, &strLen);
+ ASSERT_TRUE(targetStr16 != NULL);
+ ASSERT_EQ(String16("test2"), String16(targetStr16, strLen));
+
+ ASSERT_EQ(NO_ERROR, mTargetTable.add(overlay_arsc, overlay_arsc_len, mData, mDataSize));
+
+ ssize_t newBlock = mTargetTable.getResource(base::R::string::test2, &val, false);
+ ASSERT_GE(newBlock, 0);
+ ASSERT_EQ(block, newBlock);
+ // the above check should be enough but just to be sure we'll check the string
+ ASSERT_EQ(Res_value::TYPE_STRING, val.dataType);
+ pool = mTargetTable.getTableStringBlock(newBlock);
+ ASSERT_TRUE(pool != NULL);
+ ASSERT_LT(val.data, pool->size());
+
+ targetStr16 = pool->stringAt(val.data, &strLen);
+ ASSERT_TRUE(targetStr16 != NULL);
+ ASSERT_EQ(String16("test2"), String16(targetStr16, strLen));
+}
+
+} // namespace
diff --git a/libs/androidfw/tests/data/app/R.h b/libs/androidfw/tests/data/app/R.h
index 23e68e3..dfae98e 100644
--- a/libs/androidfw/tests/data/app/R.h
+++ b/libs/androidfw/tests/data/app/R.h
@@ -29,6 +29,15 @@ namespace attr {
namespace style {
enum {
Theme_One = 0x7f020000, // default
+ Theme_Two = 0x7f020001, // default
+ Theme_Three = 0x7f020002, // default
+ Theme_Four = 0x7f020003, // default
+ };
+}
+
+namespace color {
+ enum {
+ app_color = 0x7f030000, // default
};
}
diff --git a/libs/androidfw/tests/data/app/app_arsc.h b/libs/androidfw/tests/data/app/app_arsc.h
index d5d9a3b..be8a79a 100644
--- a/libs/androidfw/tests/data/app/app_arsc.h
+++ b/libs/androidfw/tests/data/app/app_arsc.h
@@ -1,8 +1,8 @@
unsigned char app_arsc[] = {
- 0x02, 0x00, 0x0c, 0x00, 0xc4, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x0c, 0x00, 0x18, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x9c, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xf0, 0x03, 0x00, 0x00,
0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
0x64, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x00,
@@ -25,38 +25,67 @@ unsigned char app_arsc[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x40, 0x00, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
- 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00, 0x79, 0x00,
- 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
- 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x6e, 0x00,
- 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x00, 0x00,
- 0x09, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00,
- 0x2e, 0x00, 0x4f, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00,
- 0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00,
- 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00,
- 0x64, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00
+ 0x03, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x79, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x26, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00,
+ 0x6e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x4f, 0x00,
+ 0x6e, 0x00, 0x65, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00, 0x77, 0x00,
+ 0x6f, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00,
+ 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00, 0x68, 0x00, 0x72, 0x00,
+ 0x65, 0x00, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x46, 0x00, 0x6f, 0x00,
+ 0x75, 0x00, 0x72, 0x00, 0x00, 0x00, 0x09, 0x00, 0x61, 0x00, 0x70, 0x00,
+ 0x70, 0x00, 0x5f, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f,
+ 0x08, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x05,
+ 0x01, 0x30, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1d,
+ 0xff, 0xff, 0xff, 0xff
};
-unsigned int app_arsc_len = 708;
+unsigned int app_arsc_len = 1048;
diff --git a/libs/androidfw/tests/data/app/res/values/values.xml b/libs/androidfw/tests/data/app/res/values/values.xml
index c1cf64c..a31e65b 100644
--- a/libs/androidfw/tests/data/app/res/values/values.xml
+++ b/libs/androidfw/tests/data/app/res/values/values.xml
@@ -16,7 +16,22 @@
<resources>
<attr name="number" format="integer"/>
+
<style name="Theme.One" parent="@android:style/Theme.One">
<item name="number">1</item>
</style>
+
+ <style name="Theme.Two" parent="@android:style/Theme.One">
+ <item name="number">2</item>
+ </style>
+
+ <style name="Theme.Three" parent="@android:style/Theme.One">
+ <item name="number">3</item>
+ </style>
+
+ <style name="Theme.Four" parent="@android:style/Theme.One">
+ <item name="android:someDimen">48dp</item>
+ </style>
+
+ <color name="app_color">#ffffff</color>
</resources>
diff --git a/libs/androidfw/tests/data/bags/AndroidManifest.xml b/libs/androidfw/tests/data/bags/AndroidManifest.xml
new file mode 100644
index 0000000..69cf30a
--- /dev/null
+++ b/libs/androidfw/tests/data/bags/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.bags">
+ <application>
+ </application>
+</manifest>
diff --git a/libs/androidfw/tests/data/bags/R.h b/libs/androidfw/tests/data/bags/R.h
new file mode 100644
index 0000000..bdb9254
--- /dev/null
+++ b/libs/androidfw/tests/data/bags/R.h
@@ -0,0 +1,26 @@
+#ifndef __BAGS_R_H
+#define __BAGS_R_H
+
+namespace bags {
+namespace R {
+
+namespace style {
+ enum {
+ Theme_Two = 0x61020000, // default
+ Theme_Three = 0x61020001, // default
+ Overlay = 0x61020002, // default
+ };
+}
+
+namespace color {
+ enum {
+ app_color = 0x61030000, // default
+ magenta = 0x61030001, // default
+ cyan = 0x61030002, // default
+ };
+}
+
+} // namespace R
+} // namespace bags
+
+#endif // __BAGS_R_H
diff --git a/libs/androidfw/tests/data/bags/bags_arsc.h b/libs/androidfw/tests/data/bags/bags_arsc.h
new file mode 100644
index 0000000..324cd9c
--- /dev/null
+++ b/libs/androidfw/tests/data/bags/bags_arsc.h
@@ -0,0 +1,88 @@
+unsigned char bags_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xd4, 0x03, 0x00, 0x00,
+ 0x61, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
+ 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x67, 0x00, 0x73, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x79, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00,
+ 0x70, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00,
+ 0x77, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x72, 0x00, 0x65, 0x00, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x4f, 0x00,
+ 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00,
+ 0x00, 0x00, 0x0a, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x2e, 0x00, 0x46, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x72, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x61, 0x00, 0x70, 0x00, 0x70, 0x00, 0x5f, 0x00,
+ 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x67, 0x00, 0x65, 0x00, 0x6e, 0x00,
+ 0x74, 0x00, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00, 0x63, 0x00, 0x79, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00,
+ 0xd0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x44, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x1d, 0xff, 0x00, 0x00, 0xff,
+ 0x01, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x01, 0x01, 0x00, 0x03, 0x61,
+ 0x56, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x61,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x01, 0x02, 0x00, 0x03, 0x61, 0x10, 0x00, 0x01, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x1d, 0xcc, 0xbb, 0xaa, 0xff,
+ 0x02, 0x02, 0x10, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1d,
+ 0x00, 0x00, 0x00, 0xff, 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x1d, 0xff, 0x00, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1d, 0xff, 0xff, 0x00, 0xff
+};
+unsigned int bags_arsc_len = 1020;
diff --git a/libs/androidfw/tests/data/bags/build b/libs/androidfw/tests/data/bags/build
new file mode 100755
index 0000000..9047b18
--- /dev/null
+++ b/libs/androidfw/tests/data/bags/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+aapt package -M AndroidManifest.xml -I ../system/bundle.apk -S res -x 97 -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc bags.arsc && \
+xxd -i bags.arsc > bags_arsc.h
diff --git a/libs/androidfw/tests/data/bags/res/values/values.xml b/libs/androidfw/tests/data/bags/res/values/values.xml
new file mode 100644
index 0000000..32bcf74
--- /dev/null
+++ b/libs/androidfw/tests/data/bags/res/values/values.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <style name="Theme.Two" parent="@android:style/Theme.One">
+ <item name="android:background">#0000ff</item>
+ <item name="android:foreground">@color/magenta</item>
+ <item name="android:windowNoTitle">false</item>
+ </style>
+
+ <style name="Theme.Three" parent="@style/Overlay"/>
+
+ <style name="Overlay" parent="@android:style/Theme.One">
+ <item name="android:foreground">@color/cyan</item>
+ </style>
+
+ <style name="Theme.Four" parent="@android:style/Theme.One">
+ <item name="android:background">#aabbcc</item>
+ </style>
+
+ <color name="app_color">#000000</color>
+ <color name="magenta">#ff00ff</color>
+ <color name="cyan">#00ffff</color>
+
+</resources>
diff --git a/libs/androidfw/tests/data/basic/res/drawable/drawable1.png b/libs/androidfw/tests/data/basic/res/drawable/drawable1.png
new file mode 100644
index 0000000..94660d3
--- /dev/null
+++ b/libs/androidfw/tests/data/basic/res/drawable/drawable1.png
Binary files differ
diff --git a/libs/androidfw/tests/data/basic/res/values/values.xml b/libs/androidfw/tests/data/basic/res/values/values.xml
index a010cca..cc41f9b 100644
--- a/libs/androidfw/tests/data/basic/res/values/values.xml
+++ b/libs/androidfw/tests/data/basic/res/values/values.xml
@@ -38,4 +38,7 @@
<item>2</item>
<item>3</item>
</integer-array>
+
+ <dimen name="dimen1">48dp</dimen>
+ <dimen name="dimen2">16px</dimen>
</resources>
diff --git a/libs/androidfw/tests/data/cm/app/AndroidManifest.xml b/libs/androidfw/tests/data/cm/app/AndroidManifest.xml
new file mode 100644
index 0000000..bfa3a39
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/app/AndroidManifest.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.app">
+</manifest>
diff --git a/libs/androidfw/tests/data/cm/app/R.h b/libs/androidfw/tests/data/cm/app/R.h
new file mode 100644
index 0000000..fd91728
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/app/R.h
@@ -0,0 +1,31 @@
+#ifndef __APP_R_H
+#define __APP_R_H
+
+namespace app {
+namespace R {
+
+namespace attr {
+ enum {
+ number = 0x7f010000, // default
+ };
+}
+
+namespace style {
+ enum {
+ Theme_One = 0x7f020000, // default
+ Theme_Two = 0x7f020001, // default
+ Theme_Three = 0x7f020002, // default
+ Theme_Four = 0x7f020003, // default
+ };
+}
+
+namespace color {
+ enum {
+ app_color = 0x7f030000, // default
+ };
+}
+
+} // namespace R
+} // namespace app
+
+#endif // __APP_R_H
diff --git a/libs/androidfw/tests/data/cm/app/app_arsc.h b/libs/androidfw/tests/data/cm/app/app_arsc.h
new file mode 100644
index 0000000..be8a79a
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/app/app_arsc.h
@@ -0,0 +1,91 @@
+unsigned char app_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0x18, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xf0, 0x03, 0x00, 0x00,
+ 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
+ 0x64, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x79, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x26, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00,
+ 0x6e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x4f, 0x00,
+ 0x6e, 0x00, 0x65, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00, 0x77, 0x00,
+ 0x6f, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00,
+ 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00, 0x68, 0x00, 0x72, 0x00,
+ 0x65, 0x00, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x46, 0x00, 0x6f, 0x00,
+ 0x75, 0x00, 0x72, 0x00, 0x00, 0x00, 0x09, 0x00, 0x61, 0x00, 0x70, 0x00,
+ 0x70, 0x00, 0x5f, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f,
+ 0x08, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x05,
+ 0x01, 0x30, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1d,
+ 0xff, 0xff, 0xff, 0xff
+};
+unsigned int app_arsc_len = 1048;
diff --git a/libs/androidfw/tests/data/cm/app/build b/libs/androidfw/tests/data/cm/app/build
new file mode 100755
index 0000000..89c4641
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/app/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+aapt package -v -I ../system/bundle.apk -M AndroidManifest.xml -S res -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc app.arsc && \
+xxd -i app.arsc > app_arsc.h
diff --git a/libs/androidfw/tests/data/cm/app/res/values/values.xml b/libs/androidfw/tests/data/cm/app/res/values/values.xml
new file mode 100644
index 0000000..6f11070
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/app/res/values/values.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <attr name="number" format="integer"/>
+
+ <style name="Theme.One" parent="@android:style/Theme.One">
+ <item name="number">1</item>
+ </style>
+
+ <style name="Theme.Two" parent="@android:style/Theme.One">
+ <item name="number">2</item>
+ </style>
+
+ <style name="Theme.Three" parent="@android:style/Theme.One">
+ <item name="number">3</item>
+ </style>
+
+ <style name="Theme.Four" parent="@android:style/Theme.One">
+ <item name="android:someDimen">48dp</item>
+ </style>
+
+ <color name="app_color">#ffffff</color>
+</resources>
diff --git a/libs/androidfw/tests/data/cm/bags/AndroidManifest.xml b/libs/androidfw/tests/data/cm/bags/AndroidManifest.xml
new file mode 100644
index 0000000..69cf30a
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/bags/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.bags">
+ <application>
+ </application>
+</manifest>
diff --git a/libs/androidfw/tests/data/cm/bags/R.h b/libs/androidfw/tests/data/cm/bags/R.h
new file mode 100644
index 0000000..bdb9254
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/bags/R.h
@@ -0,0 +1,26 @@
+#ifndef __BAGS_R_H
+#define __BAGS_R_H
+
+namespace bags {
+namespace R {
+
+namespace style {
+ enum {
+ Theme_Two = 0x61020000, // default
+ Theme_Three = 0x61020001, // default
+ Overlay = 0x61020002, // default
+ };
+}
+
+namespace color {
+ enum {
+ app_color = 0x61030000, // default
+ magenta = 0x61030001, // default
+ cyan = 0x61030002, // default
+ };
+}
+
+} // namespace R
+} // namespace bags
+
+#endif // __BAGS_R_H
diff --git a/libs/androidfw/tests/data/cm/bags/bags_arsc.h b/libs/androidfw/tests/data/cm/bags/bags_arsc.h
new file mode 100644
index 0000000..324cd9c
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/bags/bags_arsc.h
@@ -0,0 +1,88 @@
+unsigned char bags_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xd4, 0x03, 0x00, 0x00,
+ 0x61, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
+ 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x67, 0x00, 0x73, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x79, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00,
+ 0x70, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00,
+ 0x77, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x72, 0x00, 0x65, 0x00, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x4f, 0x00,
+ 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00,
+ 0x00, 0x00, 0x0a, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x2e, 0x00, 0x46, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x72, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x61, 0x00, 0x70, 0x00, 0x70, 0x00, 0x5f, 0x00,
+ 0x63, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x67, 0x00, 0x65, 0x00, 0x6e, 0x00,
+ 0x74, 0x00, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00, 0x63, 0x00, 0x79, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00,
+ 0xd0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x44, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x1d, 0xff, 0x00, 0x00, 0xff,
+ 0x01, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x01, 0x01, 0x00, 0x03, 0x61,
+ 0x56, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x61,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x01, 0x02, 0x00, 0x03, 0x61, 0x10, 0x00, 0x01, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x1d, 0xcc, 0xbb, 0xaa, 0xff,
+ 0x02, 0x02, 0x10, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1d,
+ 0x00, 0x00, 0x00, 0xff, 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x1d, 0xff, 0x00, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1d, 0xff, 0xff, 0x00, 0xff
+};
+unsigned int bags_arsc_len = 1020;
diff --git a/libs/androidfw/tests/data/cm/bags/build b/libs/androidfw/tests/data/cm/bags/build
new file mode 100755
index 0000000..9047b18
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/bags/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+aapt package -M AndroidManifest.xml -I ../system/bundle.apk -S res -x 97 -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc bags.arsc && \
+xxd -i bags.arsc > bags_arsc.h
diff --git a/libs/androidfw/tests/data/cm/bags/res/values/values.xml b/libs/androidfw/tests/data/cm/bags/res/values/values.xml
new file mode 100644
index 0000000..32bcf74
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/bags/res/values/values.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <style name="Theme.Two" parent="@android:style/Theme.One">
+ <item name="android:background">#0000ff</item>
+ <item name="android:foreground">@color/magenta</item>
+ <item name="android:windowNoTitle">false</item>
+ </style>
+
+ <style name="Theme.Three" parent="@style/Overlay"/>
+
+ <style name="Overlay" parent="@android:style/Theme.One">
+ <item name="android:foreground">@color/cyan</item>
+ </style>
+
+ <style name="Theme.Four" parent="@android:style/Theme.One">
+ <item name="android:background">#aabbcc</item>
+ </style>
+
+ <color name="app_color">#000000</color>
+ <color name="magenta">#ff00ff</color>
+ <color name="cyan">#00ffff</color>
+
+</resources>
diff --git a/libs/androidfw/tests/data/cm/basic/AndroidManifest.xml b/libs/androidfw/tests/data/cm/basic/AndroidManifest.xml
new file mode 100644
index 0000000..a56ac18
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.basic">
+ <application>
+ </application>
+</manifest>
diff --git a/libs/androidfw/tests/data/cm/basic/R.h b/libs/androidfw/tests/data/cm/basic/R.h
new file mode 100644
index 0000000..36bb1de
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/R.h
@@ -0,0 +1,68 @@
+#ifndef __BASE_R_H
+#define __BASE_R_H
+
+namespace base {
+namespace R {
+
+namespace attr {
+ enum {
+ attr1 = 0x7f010000, // default
+ attr2 = 0x7f010001, // default
+ };
+}
+
+namespace drawable {
+ enum {
+ drawable1 = 0x7f020000, // default
+ };
+}
+
+namespace layout {
+ enum {
+ main = 0x7f030000, // default, fr-sw600dp-v13
+ };
+}
+
+namespace string {
+ enum {
+ test1 = 0x7f040000, // default
+ test2 = 0x7f040001, // default
+
+ test3 = 0x7f0a0000, // default (in feature)
+ test4 = 0x7f0a0001, // default (in feature)
+ };
+}
+
+namespace integer {
+ enum {
+ number1 = 0x7f050000, // default, sv
+ number2 = 0x7f050001, // default
+
+ test3 = 0x7f0b0000, // default (in feature)
+ };
+}
+
+namespace style {
+ enum {
+ Theme1 = 0x7f060000, // default
+ Theme2 = 0x7f060001, // default
+ };
+}
+
+namespace array {
+ enum {
+ integerArray1 = 0x7f070000, // default
+ };
+}
+
+namespace dimen {
+ enum {
+ dimen1 = 0x7f080000, // default
+ dimen2 = 0x7f080001, // default
+ };
+}
+
+} // namespace R
+} // namespace base
+
+#endif // __BASE_R_H
diff --git a/libs/androidfw/tests/data/cm/basic/basic_arsc.h b/libs/androidfw/tests/data/cm/basic/basic_arsc.h
new file mode 100644
index 0000000..370c77c
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/basic_arsc.h
@@ -0,0 +1,194 @@
+unsigned char basic_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0xf4, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x62, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x2f, 0x00, 0x64, 0x00,
+ 0x72, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00,
+ 0x65, 0x00, 0x2f, 0x00, 0x64, 0x00, 0x72, 0x00, 0x61, 0x00, 0x77, 0x00,
+ 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x31, 0x00, 0x2e, 0x00,
+ 0x70, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x13, 0x00, 0x72, 0x00,
+ 0x65, 0x00, 0x73, 0x00, 0x2f, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00,
+ 0x6f, 0x00, 0x75, 0x00, 0x74, 0x00, 0x2f, 0x00, 0x6d, 0x00, 0x61, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x78, 0x00, 0x6d, 0x00, 0x6c, 0x00,
+ 0x00, 0x00, 0x22, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x2f, 0x00,
+ 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x74, 0x00,
+ 0x2d, 0x00, 0x66, 0x00, 0x72, 0x00, 0x2d, 0x00, 0x73, 0x00, 0x77, 0x00,
+ 0x36, 0x00, 0x30, 0x00, 0x30, 0x00, 0x64, 0x00, 0x70, 0x00, 0x2d, 0x00,
+ 0x76, 0x00, 0x31, 0x00, 0x33, 0x00, 0x2f, 0x00, 0x6d, 0x00, 0x61, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x78, 0x00, 0x6d, 0x00, 0x6c, 0x00,
+ 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x31, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01,
+ 0xf0, 0x07, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00,
+ 0x6d, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00,
+ 0x6f, 0x00, 0x69, 0x00, 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00,
+ 0x73, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x73, 0x00,
+ 0x69, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00,
+ 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
+ 0xb8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00,
+ 0x60, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, 0x08, 0x00, 0x64, 0x00,
+ 0x72, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00,
+ 0x65, 0x00, 0x00, 0x00, 0x06, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00,
+ 0x6f, 0x00, 0x75, 0x00, 0x74, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00,
+ 0x65, 0x00, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x79, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00,
+ 0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x4c, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x7e, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00,
+ 0xbc, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x61, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x64, 0x00, 0x72, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00,
+ 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00,
+ 0x6d, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x31, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x32, 0x00,
+ 0x00, 0x00, 0x07, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00,
+ 0x65, 0x00, 0x72, 0x00, 0x31, 0x00, 0x00, 0x00, 0x07, 0x00, 0x6e, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x32, 0x00,
+ 0x00, 0x00, 0x06, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x31, 0x00, 0x00, 0x00, 0x06, 0x00, 0x54, 0x00, 0x68, 0x00,
+ 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0d, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x65, 0x00,
+ 0x72, 0x00, 0x41, 0x00, 0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00,
+ 0x31, 0x00, 0x00, 0x00, 0x06, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x6e, 0x00, 0x31, 0x00, 0x00, 0x00, 0x06, 0x00, 0x64, 0x00,
+ 0x69, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x84, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00,
+ 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x04, 0x24, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00,
+ 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x66, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0xc8, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x07, 0x7f, 0x01, 0x02, 0x44, 0x00, 0x5c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x76, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0x90, 0x01, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f,
+ 0x08, 0x00, 0x00, 0x10, 0x64, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f,
+ 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x05, 0x7f, 0x10, 0x00, 0x01, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7f, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x7f, 0x08, 0x00, 0x00, 0x10, 0x2c, 0x01, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00,
+ 0x7c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x05, 0x01, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00
+};
+unsigned int basic_arsc_len = 2292;
diff --git a/libs/androidfw/tests/data/cm/basic/build b/libs/androidfw/tests/data/cm/basic/build
new file mode 100755
index 0000000..036e468
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/build
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PATH_TO_FRAMEWORK_RES=$(gettop)/prebuilts/sdk/current/android.jar
+
+aapt package -M AndroidManifest.xml -S res -I $PATH_TO_FRAMEWORK_RES --split fr,de -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc basic.arsc && \
+xxd -i basic.arsc > basic_arsc.h && \
+unzip bundle_de_fr.apk resources.arsc && \
+mv resources.arsc split_de_fr.arsc && \
+xxd -i split_de_fr.arsc > split_de_fr_arsc.h
diff --git a/libs/androidfw/tests/data/cm/basic/res/drawable/drawable1.png b/libs/androidfw/tests/data/cm/basic/res/drawable/drawable1.png
new file mode 100644
index 0000000..94660d3
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/res/drawable/drawable1.png
Binary files differ
diff --git a/libs/androidfw/tests/data/cm/basic/res/layout-fr-sw600dp/main.xml b/libs/androidfw/tests/data/cm/basic/res/layout-fr-sw600dp/main.xml
new file mode 100644
index 0000000..05ffd58
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/res/layout-fr-sw600dp/main.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merge>
+</merge>
diff --git a/libs/androidfw/tests/data/cm/basic/res/layout/main.xml b/libs/androidfw/tests/data/cm/basic/res/layout/main.xml
new file mode 100644
index 0000000..05ffd58
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/res/layout/main.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merge>
+</merge>
diff --git a/libs/androidfw/tests/data/cm/basic/res/values-de/values.xml b/libs/androidfw/tests/data/cm/basic/res/values-de/values.xml
new file mode 100644
index 0000000..103c6a3
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/res/values-de/values.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="test1">versuch 1</string>
+ <string name="test2">versuch 2</string>
+</resources>
diff --git a/libs/androidfw/tests/data/cm/basic/res/values-fr/values.xml b/libs/androidfw/tests/data/cm/basic/res/values-fr/values.xml
new file mode 100644
index 0000000..1806a2d
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/res/values-fr/values.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="test1">essai 1</string>
+ <string name="test2">essai 2</string>
+</resources>
diff --git a/libs/androidfw/tests/data/cm/basic/res/values-sv/values.xml b/libs/androidfw/tests/data/cm/basic/res/values-sv/values.xml
new file mode 100644
index 0000000..9d52307
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/res/values-sv/values.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <integer name="number1">400</integer>
+</resources>
diff --git a/libs/androidfw/tests/data/cm/basic/res/values/values.xml b/libs/androidfw/tests/data/cm/basic/res/values/values.xml
new file mode 100644
index 0000000..0d22a4c
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/res/values/values.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <attr name="attr1" format="reference|integer" />
+ <attr name="attr2" format="reference|integer" />
+
+ <string name="test1">test1</string>
+ <string name="test2">test2</string>
+
+ <integer name="number1">200</integer>
+ <integer name="number2">@array/integerArray1</integer>
+
+ <style name="Theme1">
+ <item name="com.android.test.basic:attr1">100</item>
+ <item name="com.android.test.basic:attr2">@integer/number1</item>
+ </style>
+
+ <style name="Theme2" parent="@com.android.test.basic:style/Theme1">
+ <item name="com.android.test.basic:attr1">300</item>
+ </style>
+
+ <integer-array name="integerArray1">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ </integer-array>
+
+ <dimen name="dimen1">48dp</dimen>
+ <dimen name="dimen2">16px</dimen>
+</resources>
diff --git a/libs/androidfw/tests/data/cm/basic/split_de_fr_arsc.h b/libs/androidfw/tests/data/cm/basic/split_de_fr_arsc.h
new file mode 100644
index 0000000..23cb3b7
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/basic/split_de_fr_arsc.h
@@ -0,0 +1,92 @@
+unsigned char split_de_fr_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0x2c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
+ 0x2c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x09, 0x00, 0x76, 0x00,
+ 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x75, 0x00, 0x63, 0x00, 0x68, 0x00,
+ 0x20, 0x00, 0x31, 0x00, 0x00, 0x00, 0x09, 0x00, 0x76, 0x00, 0x65, 0x00,
+ 0x72, 0x00, 0x73, 0x00, 0x75, 0x00, 0x63, 0x00, 0x68, 0x00, 0x20, 0x00,
+ 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x65, 0x00, 0x73, 0x00, 0x73, 0x00,
+ 0x61, 0x00, 0x69, 0x00, 0x20, 0x00, 0x31, 0x00, 0x00, 0x00, 0x07, 0x00,
+ 0x65, 0x00, 0x73, 0x00, 0x73, 0x00, 0x61, 0x00, 0x69, 0x00, 0x20, 0x00,
+ 0x32, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xa4, 0x03, 0x00, 0x00,
+ 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
+ 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x63, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0xb8, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
+ 0x6e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x08, 0x00, 0x64, 0x00, 0x72, 0x00, 0x61, 0x00,
+ 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00, 0x6f, 0x00, 0x75, 0x00,
+ 0x74, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x07, 0x00, 0x69, 0x00,
+ 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00,
+ 0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00, 0x79, 0x00, 0x6c, 0x00,
+ 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00, 0x72, 0x00, 0x72, 0x00,
+ 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x05, 0x00, 0x64, 0x00, 0x69, 0x00,
+ 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00,
+ 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x31, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x72, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x03, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+unsigned int split_de_fr_arsc_len = 1068;
diff --git a/libs/androidfw/tests/data/cm/overlay/AndroidManifest.xml b/libs/androidfw/tests/data/cm/overlay/AndroidManifest.xml
new file mode 100644
index 0000000..a56ac18
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/overlay/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.basic">
+ <application>
+ </application>
+</manifest>
diff --git a/libs/androidfw/tests/data/cm/overlay/build b/libs/androidfw/tests/data/cm/overlay/build
new file mode 100755
index 0000000..87cf6de
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/overlay/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+aapt package -M AndroidManifest.xml -S res -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc overlay.arsc && \
+xxd -i overlay.arsc > overlay_arsc.h
diff --git a/libs/androidfw/tests/data/cm/overlay/overlay_arsc.h b/libs/androidfw/tests/data/cm/overlay/overlay_arsc.h
new file mode 100644
index 0000000..2d59417
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/overlay/overlay_arsc.h
@@ -0,0 +1,103 @@
+unsigned char overlay_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0xa8, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x2f, 0x00, 0x64, 0x00,
+ 0x72, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00,
+ 0x65, 0x00, 0x2f, 0x00, 0x64, 0x00, 0x72, 0x00, 0x61, 0x00, 0x77, 0x00,
+ 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x31, 0x00, 0x2e, 0x00,
+ 0x70, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x74, 0x00,
+ 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x6f, 0x00,
+ 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x20, 0x04, 0x00, 0x00,
+ 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
+ 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x63, 0x00,
+ 0x2e, 0x00, 0x6f, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6c, 0x00,
+ 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x3e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x08, 0x00, 0x64, 0x00, 0x72, 0x00, 0x61, 0x00,
+ 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00,
+ 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00, 0x72, 0x00, 0x72, 0x00,
+ 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x05, 0x00, 0x64, 0x00, 0x69, 0x00,
+ 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
+ 0x94, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
+ 0x42, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x09, 0x00, 0x64, 0x00,
+ 0x72, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00,
+ 0x65, 0x00, 0x31, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00,
+ 0x73, 0x00, 0x74, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x69, 0x00,
+ 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00,
+ 0x41, 0x00, 0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00, 0x31, 0x00,
+ 0x00, 0x00, 0x06, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x65, 0x00,
+ 0x6e, 0x00, 0x31, 0x00, 0x00, 0x00, 0x06, 0x00, 0x64, 0x00, 0x69, 0x00,
+ 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x70, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10,
+ 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10,
+ 0x0b, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x05, 0x02, 0x38, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x05,
+ 0x01, 0x0c, 0x00, 0x00
+};
+unsigned int overlay_arsc_len = 1192;
diff --git a/libs/androidfw/tests/data/cm/overlay/res/drawable/drawable1.png b/libs/androidfw/tests/data/cm/overlay/res/drawable/drawable1.png
new file mode 100644
index 0000000..a7045ed
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/overlay/res/drawable/drawable1.png
Binary files differ
diff --git a/libs/androidfw/tests/data/cm/overlay/res/values/values.xml b/libs/androidfw/tests/data/cm/overlay/res/values/values.xml
new file mode 100644
index 0000000..5bf0427
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/overlay/res/values/values.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="test2">test2-overlay</string>
+ <integer-array name="integerArray1">
+ <item>10</item>
+ <item>11</item>
+ </integer-array>
+
+ <dimen name="dimen1">56sp</dimen>
+ <dimen name="dimen2">12dp</dimen>
+
+</resources>
diff --git a/libs/androidfw/tests/data/cm/override/AndroidManifest.xml b/libs/androidfw/tests/data/cm/override/AndroidManifest.xml
new file mode 100644
index 0000000..ed26054
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/override/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.override">
+ <application>
+ </application>
+</manifest>
diff --git a/libs/androidfw/tests/data/cm/override/R.h b/libs/androidfw/tests/data/cm/override/R.h
new file mode 100644
index 0000000..a57c6b1
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/override/R.h
@@ -0,0 +1,16 @@
+#ifndef __BASE_R_H
+#define __BASE_R_H
+
+namespace override {
+namespace R {
+
+namespace string {
+ enum {
+ string1 = 0x7f020000, // default
+ };
+}
+
+} // namespace R
+} // namespace base
+
+#endif // __BASE_R_H
diff --git a/libs/androidfw/tests/data/cm/override/build b/libs/androidfw/tests/data/cm/override/build
new file mode 100755
index 0000000..f6ba33d
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/override/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+aapt package -M AndroidManifest.xml -S res -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc override.arsc && \
+xxd -i override.arsc > override_arsc.h
diff --git a/libs/androidfw/tests/data/cm/override/override_arsc.h b/libs/androidfw/tests/data/cm/override/override_arsc.h
new file mode 100644
index 0000000..2598635
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/override/override_arsc.h
@@ -0,0 +1,53 @@
+unsigned char override_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0x50, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x31, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x10, 0x02, 0x00, 0x00,
+ 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
+ 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x2e, 0x00, 0x6f, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
+ 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x00, 0x00
+};
+unsigned int override_arsc_len = 592;
diff --git a/libs/androidfw/tests/data/cm/override/res/values/values.xml b/libs/androidfw/tests/data/cm/override/res/values/values.xml
new file mode 100644
index 0000000..7b607ef
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/override/res/values/values.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="string1">string1</string>
+</resources>
diff --git a/libs/androidfw/tests/data/cm/system/AndroidManifest.xml b/libs/androidfw/tests/data/cm/system/AndroidManifest.xml
new file mode 100644
index 0000000..af105ee
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/system/AndroidManifest.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android">
+</manifest>
diff --git a/libs/androidfw/tests/data/cm/system/R.h b/libs/androidfw/tests/data/cm/system/R.h
new file mode 100644
index 0000000..ba83b89
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/system/R.h
@@ -0,0 +1,26 @@
+#ifndef __ANDROID_R_H
+#define __ANDROID_R_H
+
+namespace android {
+namespace R {
+
+namespace attr {
+ enum {
+ background = 0x01010000, // default
+ foreground = 0x01010001, // default
+ some_dimen = 0x01010002, // default
+ another_dimen = 0x01010003, // default
+ windowNoTitle = 0x01010056, // default
+ };
+}
+
+namespace style {
+ enum {
+ Theme_One = 0x01020000, // default
+ };
+}
+
+} // namespace R
+} // namespace android
+
+#endif // __ANDROID_R_H
diff --git a/libs/androidfw/tests/data/cm/system/build b/libs/androidfw/tests/data/cm/system/build
new file mode 100755
index 0000000..2a3ac0b
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/system/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+aapt package -x -M AndroidManifest.xml -S res -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc system.arsc && \
+xxd -i system.arsc > system_arsc.h
diff --git a/libs/androidfw/tests/data/cm/system/res/values/filler.xml b/libs/androidfw/tests/data/cm/system/res/values/filler.xml
new file mode 100644
index 0000000..27af8dc
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/system/res/values/filler.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Filler so we can test the protected attribute "windowNoTitle" -->
+ <java-symbol name="dummyAttr04" type="attr" id="0x01010004" />
+ <java-symbol name="dummyAttr05" type="attr" id="0x01010005" />
+ <java-symbol name="dummyAttr06" type="attr" id="0x01010006" />
+ <java-symbol name="dummyAttr07" type="attr" id="0x01010007" />
+ <java-symbol name="dummyAttr08" type="attr" id="0x01010008" />
+ <java-symbol name="dummyAttr09" type="attr" id="0x01010009" />
+ <java-symbol name="dummyAttr0a" type="attr" id="0x0101000a" />
+ <java-symbol name="dummyAttr0b" type="attr" id="0x0101000b" />
+ <java-symbol name="dummyAttr0c" type="attr" id="0x0101000c" />
+ <java-symbol name="dummyAttr0d" type="attr" id="0x0101000d" />
+ <java-symbol name="dummyAttr0e" type="attr" id="0x0101000e" />
+ <java-symbol name="dummyAttr0f" type="attr" id="0x0101000f" />
+ <java-symbol name="dummyAttr10" type="attr" id="0x01010010" />
+ <java-symbol name="dummyAttr11" type="attr" id="0x01010011" />
+ <java-symbol name="dummyAttr12" type="attr" id="0x01010012" />
+ <java-symbol name="dummyAttr13" type="attr" id="0x01010013" />
+ <java-symbol name="dummyAttr14" type="attr" id="0x01010014" />
+ <java-symbol name="dummyAttr15" type="attr" id="0x01010015" />
+ <java-symbol name="dummyAttr16" type="attr" id="0x01010016" />
+ <java-symbol name="dummyAttr17" type="attr" id="0x01010017" />
+ <java-symbol name="dummyAttr18" type="attr" id="0x01010018" />
+ <java-symbol name="dummyAttr19" type="attr" id="0x01010019" />
+ <java-symbol name="dummyAttr1a" type="attr" id="0x0101001a" />
+ <java-symbol name="dummyAttr1b" type="attr" id="0x0101001b" />
+ <java-symbol name="dummyAttr1c" type="attr" id="0x0101001c" />
+ <java-symbol name="dummyAttr1d" type="attr" id="0x0101001d" />
+ <java-symbol name="dummyAttr1e" type="attr" id="0x0101001e" />
+ <java-symbol name="dummyAttr1f" type="attr" id="0x0101001f" />
+ <java-symbol name="dummyAttr20" type="attr" id="0x01010020" />
+ <java-symbol name="dummyAttr21" type="attr" id="0x01010021" />
+ <java-symbol name="dummyAttr22" type="attr" id="0x01010022" />
+ <java-symbol name="dummyAttr23" type="attr" id="0x01010023" />
+ <java-symbol name="dummyAttr24" type="attr" id="0x01010024" />
+ <java-symbol name="dummyAttr25" type="attr" id="0x01010025" />
+ <java-symbol name="dummyAttr26" type="attr" id="0x01010026" />
+ <java-symbol name="dummyAttr27" type="attr" id="0x01010027" />
+ <java-symbol name="dummyAttr28" type="attr" id="0x01010028" />
+ <java-symbol name="dummyAttr29" type="attr" id="0x01010029" />
+ <java-symbol name="dummyAttr2a" type="attr" id="0x0101002a" />
+ <java-symbol name="dummyAttr2b" type="attr" id="0x0101002b" />
+ <java-symbol name="dummyAttr2c" type="attr" id="0x0101002c" />
+ <java-symbol name="dummyAttr2d" type="attr" id="0x0101002d" />
+ <java-symbol name="dummyAttr2e" type="attr" id="0x0101002e" />
+ <java-symbol name="dummyAttr2f" type="attr" id="0x0101002f" />
+ <java-symbol name="dummyAttr30" type="attr" id="0x01010030" />
+ <java-symbol name="dummyAttr31" type="attr" id="0x01010031" />
+ <java-symbol name="dummyAttr32" type="attr" id="0x01010032" />
+ <java-symbol name="dummyAttr33" type="attr" id="0x01010033" />
+ <java-symbol name="dummyAttr34" type="attr" id="0x01010034" />
+ <java-symbol name="dummyAttr35" type="attr" id="0x01010035" />
+ <java-symbol name="dummyAttr36" type="attr" id="0x01010036" />
+ <java-symbol name="dummyAttr37" type="attr" id="0x01010037" />
+ <java-symbol name="dummyAttr38" type="attr" id="0x01010038" />
+ <java-symbol name="dummyAttr39" type="attr" id="0x01010039" />
+ <java-symbol name="dummyAttr3a" type="attr" id="0x0101003a" />
+ <java-symbol name="dummyAttr3b" type="attr" id="0x0101003b" />
+ <java-symbol name="dummyAttr3c" type="attr" id="0x0101003c" />
+ <java-symbol name="dummyAttr3d" type="attr" id="0x0101003d" />
+ <java-symbol name="dummyAttr3e" type="attr" id="0x0101003e" />
+ <java-symbol name="dummyAttr3f" type="attr" id="0x0101003f" />
+ <java-symbol name="dummyAttr40" type="attr" id="0x01010040" />
+ <java-symbol name="dummyAttr41" type="attr" id="0x01010041" />
+ <java-symbol name="dummyAttr42" type="attr" id="0x01010042" />
+ <java-symbol name="dummyAttr43" type="attr" id="0x01010043" />
+ <java-symbol name="dummyAttr44" type="attr" id="0x01010044" />
+ <java-symbol name="dummyAttr45" type="attr" id="0x01010045" />
+ <java-symbol name="dummyAttr46" type="attr" id="0x01010046" />
+ <java-symbol name="dummyAttr47" type="attr" id="0x01010047" />
+ <java-symbol name="dummyAttr48" type="attr" id="0x01010048" />
+ <java-symbol name="dummyAttr49" type="attr" id="0x01010049" />
+ <java-symbol name="dummyAttr4a" type="attr" id="0x0101004a" />
+ <java-symbol name="dummyAttr4b" type="attr" id="0x0101004b" />
+ <java-symbol name="dummyAttr4c" type="attr" id="0x0101004c" />
+ <java-symbol name="dummyAttr4d" type="attr" id="0x0101004d" />
+ <java-symbol name="dummyAttr4e" type="attr" id="0x0101004e" />
+ <java-symbol name="dummyAttr4f" type="attr" id="0x0101004f" />
+ <java-symbol name="dummyAttr50" type="attr" id="0x01010050" />
+ <java-symbol name="dummyAttr51" type="attr" id="0x01010051" />
+ <java-symbol name="dummyAttr52" type="attr" id="0x01010052" />
+ <java-symbol name="dummyAttr53" type="attr" id="0x01010053" />
+ <java-symbol name="dummyAttr54" type="attr" id="0x01010054" />
+ <java-symbol name="dummyAttr55" type="attr" id="0x01010055" />
+ <attr name="dummyAttr04" format="reference"/>
+ <attr name="dummyAttr05" format="reference"/>
+ <attr name="dummyAttr06" format="reference"/>
+ <attr name="dummyAttr07" format="reference"/>
+ <attr name="dummyAttr08" format="reference"/>
+ <attr name="dummyAttr09" format="reference"/>
+ <attr name="dummyAttr0a" format="reference"/>
+ <attr name="dummyAttr0b" format="reference"/>
+ <attr name="dummyAttr0c" format="reference"/>
+ <attr name="dummyAttr0d" format="reference"/>
+ <attr name="dummyAttr0e" format="reference"/>
+ <attr name="dummyAttr0f" format="reference"/>
+ <attr name="dummyAttr10" format="reference"/>
+ <attr name="dummyAttr11" format="reference"/>
+ <attr name="dummyAttr12" format="reference"/>
+ <attr name="dummyAttr13" format="reference"/>
+ <attr name="dummyAttr14" format="reference"/>
+ <attr name="dummyAttr15" format="reference"/>
+ <attr name="dummyAttr16" format="reference"/>
+ <attr name="dummyAttr17" format="reference"/>
+ <attr name="dummyAttr18" format="reference"/>
+ <attr name="dummyAttr19" format="reference"/>
+ <attr name="dummyAttr1a" format="reference"/>
+ <attr name="dummyAttr1b" format="reference"/>
+ <attr name="dummyAttr1c" format="reference"/>
+ <attr name="dummyAttr1d" format="reference"/>
+ <attr name="dummyAttr1e" format="reference"/>
+ <attr name="dummyAttr1f" format="reference"/>
+ <attr name="dummyAttr20" format="reference"/>
+ <attr name="dummyAttr21" format="reference"/>
+ <attr name="dummyAttr22" format="reference"/>
+ <attr name="dummyAttr23" format="reference"/>
+ <attr name="dummyAttr24" format="reference"/>
+ <attr name="dummyAttr25" format="reference"/>
+ <attr name="dummyAttr26" format="reference"/>
+ <attr name="dummyAttr27" format="reference"/>
+ <attr name="dummyAttr28" format="reference"/>
+ <attr name="dummyAttr29" format="reference"/>
+ <attr name="dummyAttr2a" format="reference"/>
+ <attr name="dummyAttr2b" format="reference"/>
+ <attr name="dummyAttr2c" format="reference"/>
+ <attr name="dummyAttr2d" format="reference"/>
+ <attr name="dummyAttr2e" format="reference"/>
+ <attr name="dummyAttr2f" format="reference"/>
+ <attr name="dummyAttr30" format="reference"/>
+ <attr name="dummyAttr31" format="reference"/>
+ <attr name="dummyAttr32" format="reference"/>
+ <attr name="dummyAttr33" format="reference"/>
+ <attr name="dummyAttr34" format="reference"/>
+ <attr name="dummyAttr35" format="reference"/>
+ <attr name="dummyAttr36" format="reference"/>
+ <attr name="dummyAttr37" format="reference"/>
+ <attr name="dummyAttr38" format="reference"/>
+ <attr name="dummyAttr39" format="reference"/>
+ <attr name="dummyAttr3a" format="reference"/>
+ <attr name="dummyAttr3b" format="reference"/>
+ <attr name="dummyAttr3c" format="reference"/>
+ <attr name="dummyAttr3d" format="reference"/>
+ <attr name="dummyAttr3e" format="reference"/>
+ <attr name="dummyAttr3f" format="reference"/>
+ <attr name="dummyAttr40" format="reference"/>
+ <attr name="dummyAttr41" format="reference"/>
+ <attr name="dummyAttr42" format="reference"/>
+ <attr name="dummyAttr43" format="reference"/>
+ <attr name="dummyAttr44" format="reference"/>
+ <attr name="dummyAttr45" format="reference"/>
+ <attr name="dummyAttr46" format="reference"/>
+ <attr name="dummyAttr47" format="reference"/>
+ <attr name="dummyAttr48" format="reference"/>
+ <attr name="dummyAttr49" format="reference"/>
+ <attr name="dummyAttr4a" format="reference"/>
+ <attr name="dummyAttr4b" format="reference"/>
+ <attr name="dummyAttr4c" format="reference"/>
+ <attr name="dummyAttr4d" format="reference"/>
+ <attr name="dummyAttr4e" format="reference"/>
+ <attr name="dummyAttr4f" format="reference"/>
+ <attr name="dummyAttr50" format="reference"/>
+ <attr name="dummyAttr51" format="reference"/>
+ <attr name="dummyAttr52" format="reference"/>
+ <attr name="dummyAttr53" format="reference"/>
+ <attr name="dummyAttr54" format="reference"/>
+ <attr name="dummyAttr55" format="reference"/>
+</resources> \ No newline at end of file
diff --git a/libs/androidfw/tests/data/cm/system/res/values/themes.xml b/libs/androidfw/tests/data/cm/system/res/values/themes.xml
new file mode 100644
index 0000000..c870b1e
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/system/res/values/themes.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <public name="background" type="attr" id="0x01010000"/>
+ <public name="foreground" type="attr" id="0x01010001"/>
+ <public name="someDimen" type="attr" id="0x01010002" />
+ <public name="anotherDimen" type="attr" id="0x01010003" />
+ <!-- attributes 0x01010004 to 0x01010055 are in filler.xml -->
+ <public name="windowNoTitle" type="attr" id="0x01010056" />
+ <public name="Theme.One" type="style" id="0x01020000"/>
+
+ <attr name="background" format="color|reference"/>
+ <attr name="foreground" format="color|reference"/>
+ <attr name="someDimen" format="dimension|reference"/>
+ <attr name="anotherDimen" format="dimension|reference"/>
+ <attr name="windowNoTitle" format="boolean|reference"/>
+ <style name="Theme.One" parent="">
+ <item name="android:background">#ff0000</item>
+ <item name="android:foreground">#000000</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+</resources>
diff --git a/libs/androidfw/tests/data/cm/system/system_arsc.h b/libs/androidfw/tests/data/cm/system/system_arsc.h
new file mode 100644
index 0000000..e157a0e
--- /dev/null
+++ b/libs/androidfw/tests/data/cm/system/system_arsc.h
@@ -0,0 +1,538 @@
+unsigned char system_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0x10, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xe8, 0x18, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00,
+ 0x6f, 0x00, 0x69, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00, 0x79, 0x00,
+ 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
+ 0x68, 0x0a, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x46, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x96, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0xca, 0x00, 0x00, 0x00,
+ 0xe4, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00,
+ 0x32, 0x01, 0x00, 0x00, 0x4c, 0x01, 0x00, 0x00, 0x66, 0x01, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x9a, 0x01, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00,
+ 0xce, 0x01, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
+ 0x1c, 0x02, 0x00, 0x00, 0x36, 0x02, 0x00, 0x00, 0x50, 0x02, 0x00, 0x00,
+ 0x6a, 0x02, 0x00, 0x00, 0x84, 0x02, 0x00, 0x00, 0x9e, 0x02, 0x00, 0x00,
+ 0xb8, 0x02, 0x00, 0x00, 0xd2, 0x02, 0x00, 0x00, 0xec, 0x02, 0x00, 0x00,
+ 0x06, 0x03, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x3a, 0x03, 0x00, 0x00,
+ 0x54, 0x03, 0x00, 0x00, 0x6e, 0x03, 0x00, 0x00, 0x88, 0x03, 0x00, 0x00,
+ 0xa2, 0x03, 0x00, 0x00, 0xbc, 0x03, 0x00, 0x00, 0xd6, 0x03, 0x00, 0x00,
+ 0xf0, 0x03, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x24, 0x04, 0x00, 0x00,
+ 0x3e, 0x04, 0x00, 0x00, 0x58, 0x04, 0x00, 0x00, 0x72, 0x04, 0x00, 0x00,
+ 0x8c, 0x04, 0x00, 0x00, 0xa6, 0x04, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00,
+ 0xda, 0x04, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x0e, 0x05, 0x00, 0x00,
+ 0x28, 0x05, 0x00, 0x00, 0x42, 0x05, 0x00, 0x00, 0x5c, 0x05, 0x00, 0x00,
+ 0x76, 0x05, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0xaa, 0x05, 0x00, 0x00,
+ 0xc4, 0x05, 0x00, 0x00, 0xde, 0x05, 0x00, 0x00, 0xf8, 0x05, 0x00, 0x00,
+ 0x12, 0x06, 0x00, 0x00, 0x2c, 0x06, 0x00, 0x00, 0x46, 0x06, 0x00, 0x00,
+ 0x60, 0x06, 0x00, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x94, 0x06, 0x00, 0x00,
+ 0xae, 0x06, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00, 0xe2, 0x06, 0x00, 0x00,
+ 0xfc, 0x06, 0x00, 0x00, 0x16, 0x07, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00,
+ 0x4a, 0x07, 0x00, 0x00, 0x64, 0x07, 0x00, 0x00, 0x7e, 0x07, 0x00, 0x00,
+ 0x98, 0x07, 0x00, 0x00, 0xb2, 0x07, 0x00, 0x00, 0xcc, 0x07, 0x00, 0x00,
+ 0xe6, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00,
+ 0x34, 0x08, 0x00, 0x00, 0x4e, 0x08, 0x00, 0x00, 0x68, 0x08, 0x00, 0x00,
+ 0x82, 0x08, 0x00, 0x00, 0x9c, 0x08, 0x00, 0x00, 0xb6, 0x08, 0x00, 0x00,
+ 0xd4, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x62, 0x00, 0x61, 0x00, 0x63, 0x00,
+ 0x6b, 0x00, 0x67, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x6e, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x72, 0x00,
+ 0x65, 0x00, 0x67, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x6e, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x09, 0x00, 0x73, 0x00, 0x6f, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x44, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00,
+ 0x00, 0x00, 0x0c, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x74, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x72, 0x00, 0x44, 0x00, 0x69, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x30, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x36, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x37, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x30, 0x00, 0x39, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x30, 0x00, 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x63, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x64, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00,
+ 0x65, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x30, 0x00, 0x66, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x31, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x33, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00,
+ 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x31, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x31, 0x00, 0x36, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x39, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00,
+ 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x31, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x31, 0x00, 0x63, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x65, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x66, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x32, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x35, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00,
+ 0x36, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x32, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x32, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x39, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x61, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x62, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00,
+ 0x63, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x32, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x32, 0x00, 0x65, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x66, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x31, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00,
+ 0x32, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x33, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x33, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x36, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x37, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x33, 0x00, 0x39, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x33, 0x00, 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x63, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x64, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00,
+ 0x65, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x33, 0x00, 0x66, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x34, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x33, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00,
+ 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x34, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x34, 0x00, 0x36, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x39, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00,
+ 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x34, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x34, 0x00, 0x63, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x65, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x66, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x35, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x35, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x35, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x35, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x35, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x35, 0x00, 0x35, 0x00,
+ 0x00, 0x00, 0x0d, 0x00, 0x77, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x64, 0x00,
+ 0x6f, 0x00, 0x77, 0x00, 0x4e, 0x00, 0x6f, 0x00, 0x54, 0x00, 0x69, 0x00,
+ 0x74, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x4f, 0x00,
+ 0x6e, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,
+ 0x6c, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
+ 0x01, 0x02, 0x44, 0x00, 0x24, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x57, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
+ 0x70, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00,
+ 0xc4, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00,
+ 0x18, 0x01, 0x00, 0x00, 0x34, 0x01, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00,
+ 0x6c, 0x01, 0x00, 0x00, 0x88, 0x01, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00,
+ 0x14, 0x02, 0x00, 0x00, 0x30, 0x02, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00,
+ 0x68, 0x02, 0x00, 0x00, 0x84, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00,
+ 0xbc, 0x02, 0x00, 0x00, 0xd8, 0x02, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00,
+ 0x10, 0x03, 0x00, 0x00, 0x2c, 0x03, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00,
+ 0x64, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x9c, 0x03, 0x00, 0x00,
+ 0xb8, 0x03, 0x00, 0x00, 0xd4, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00,
+ 0x0c, 0x04, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00,
+ 0x60, 0x04, 0x00, 0x00, 0x7c, 0x04, 0x00, 0x00, 0x98, 0x04, 0x00, 0x00,
+ 0xb4, 0x04, 0x00, 0x00, 0xd0, 0x04, 0x00, 0x00, 0xec, 0x04, 0x00, 0x00,
+ 0x08, 0x05, 0x00, 0x00, 0x24, 0x05, 0x00, 0x00, 0x40, 0x05, 0x00, 0x00,
+ 0x5c, 0x05, 0x00, 0x00, 0x78, 0x05, 0x00, 0x00, 0x94, 0x05, 0x00, 0x00,
+ 0xb0, 0x05, 0x00, 0x00, 0xcc, 0x05, 0x00, 0x00, 0xe8, 0x05, 0x00, 0x00,
+ 0x04, 0x06, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00,
+ 0x58, 0x06, 0x00, 0x00, 0x74, 0x06, 0x00, 0x00, 0x90, 0x06, 0x00, 0x00,
+ 0xac, 0x06, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00, 0xe4, 0x06, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x38, 0x07, 0x00, 0x00,
+ 0x54, 0x07, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x8c, 0x07, 0x00, 0x00,
+ 0xa8, 0x07, 0x00, 0x00, 0xc4, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
+ 0xfc, 0x07, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00,
+ 0x50, 0x08, 0x00, 0x00, 0x6c, 0x08, 0x00, 0x00, 0x88, 0x08, 0x00, 0x00,
+ 0xa4, 0x08, 0x00, 0x00, 0xc0, 0x08, 0x00, 0x00, 0xdc, 0x08, 0x00, 0x00,
+ 0xf8, 0x08, 0x00, 0x00, 0x14, 0x09, 0x00, 0x00, 0x30, 0x09, 0x00, 0x00,
+ 0x4c, 0x09, 0x00, 0x00, 0x68, 0x09, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x41, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x41, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x17, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x1a, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x1d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x23, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x26, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x3b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x44, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x47, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x4a, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x53, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x56, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x01, 0x02, 0x44, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x57, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff, 0x56, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff
+};
+unsigned int system_arsc_len = 6416;
diff --git a/libs/androidfw/tests/data/overlay/overlay_arsc.h b/libs/androidfw/tests/data/overlay/overlay_arsc.h
index 5bd98b2..2d59417 100644
--- a/libs/androidfw/tests/data/overlay/overlay_arsc.h
+++ b/libs/androidfw/tests/data/overlay/overlay_arsc.h
@@ -1,17 +1,22 @@
unsigned char overlay_arsc[] = {
- 0x02, 0x00, 0x0c, 0x00, 0x10, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x1c, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x74, 0x00,
+ 0x02, 0x00, 0x0c, 0x00, 0xa8, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x1a, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x2f, 0x00, 0x64, 0x00,
+ 0x72, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00,
+ 0x65, 0x00, 0x2f, 0x00, 0x64, 0x00, 0x72, 0x00, 0x61, 0x00, 0x77, 0x00,
+ 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x31, 0x00, 0x2e, 0x00,
+ 0x70, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x74, 0x00,
0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x6f, 0x00,
0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xc4, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x20, 0x04, 0x00, 0x00,
0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
0x2e, 0x00, 0x62, 0x00, 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x63, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x2e, 0x00, 0x6f, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6c, 0x00,
+ 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -28,21 +33,30 @@ unsigned char overlay_arsc[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x74, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x54, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00,
- 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00,
- 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00,
- 0x05, 0x00, 0x61, 0x00, 0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x50, 0x00, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00,
- 0x74, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x69, 0x00, 0x6e, 0x00,
- 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00, 0x41, 0x00,
- 0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00, 0x31, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x3e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x08, 0x00, 0x64, 0x00, 0x72, 0x00, 0x61, 0x00,
+ 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00,
+ 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x61, 0x00, 0x72, 0x00, 0x72, 0x00,
+ 0x61, 0x00, 0x79, 0x00, 0x00, 0x00, 0x05, 0x00, 0x64, 0x00, 0x69, 0x00,
+ 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
+ 0x94, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
+ 0x42, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x09, 0x00, 0x64, 0x00,
+ 0x72, 0x00, 0x61, 0x00, 0x77, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6c, 0x00,
+ 0x65, 0x00, 0x31, 0x00, 0x00, 0x00, 0x05, 0x00, 0x74, 0x00, 0x65, 0x00,
+ 0x73, 0x00, 0x74, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x69, 0x00,
+ 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00,
+ 0x41, 0x00, 0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00, 0x31, 0x00,
+ 0x00, 0x00, 0x06, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x65, 0x00,
+ 0x6e, 0x00, 0x31, 0x00, 0x00, 0x00, 0x06, 0x00, 0x64, 0x00, 0x69, 0x00,
+ 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -55,15 +69,35 @@ unsigned char overlay_arsc[] = {
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x02, 0x44, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x70, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x10, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10,
0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x10,
- 0x0b, 0x00, 0x00, 0x00
+ 0x0b, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x44, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x05, 0x02, 0x38, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x05,
+ 0x01, 0x0c, 0x00, 0x00
};
-unsigned int overlay_arsc_len = 784;
+unsigned int overlay_arsc_len = 1192;
diff --git a/libs/androidfw/tests/data/overlay/res/drawable/drawable1.png b/libs/androidfw/tests/data/overlay/res/drawable/drawable1.png
new file mode 100644
index 0000000..a7045ed
--- /dev/null
+++ b/libs/androidfw/tests/data/overlay/res/drawable/drawable1.png
Binary files differ
diff --git a/libs/androidfw/tests/data/overlay/res/values/values.xml b/libs/androidfw/tests/data/overlay/res/values/values.xml
index 3e1af98..3fd4ae9 100644
--- a/libs/androidfw/tests/data/overlay/res/values/values.xml
+++ b/libs/androidfw/tests/data/overlay/res/values/values.xml
@@ -20,4 +20,8 @@
<item>10</item>
<item>11</item>
</integer-array>
+
+ <dimen name="dimen1">56sp</dimen>
+ <dimen name="dimen2">12dp</dimen>
+
</resources>
diff --git a/libs/androidfw/tests/data/override/AndroidManifest.xml b/libs/androidfw/tests/data/override/AndroidManifest.xml
new file mode 100644
index 0000000..ed26054
--- /dev/null
+++ b/libs/androidfw/tests/data/override/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.test.override">
+ <application>
+ </application>
+</manifest>
diff --git a/libs/androidfw/tests/data/override/R.h b/libs/androidfw/tests/data/override/R.h
new file mode 100644
index 0000000..a57c6b1
--- /dev/null
+++ b/libs/androidfw/tests/data/override/R.h
@@ -0,0 +1,16 @@
+#ifndef __BASE_R_H
+#define __BASE_R_H
+
+namespace override {
+namespace R {
+
+namespace string {
+ enum {
+ string1 = 0x7f020000, // default
+ };
+}
+
+} // namespace R
+} // namespace base
+
+#endif // __BASE_R_H
diff --git a/libs/androidfw/tests/data/override/build b/libs/androidfw/tests/data/override/build
new file mode 100755
index 0000000..f6ba33d
--- /dev/null
+++ b/libs/androidfw/tests/data/override/build
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+aapt package -M AndroidManifest.xml -S res -F bundle.apk -f && \
+unzip bundle.apk resources.arsc && \
+mv resources.arsc override.arsc && \
+xxd -i override.arsc > override_arsc.h
diff --git a/libs/androidfw/tests/data/override/override_arsc.h b/libs/androidfw/tests/data/override/override_arsc.h
new file mode 100644
index 0000000..2598635
--- /dev/null
+++ b/libs/androidfw/tests/data/override/override_arsc.h
@@ -0,0 +1,53 @@
+unsigned char override_arsc[] = {
+ 0x02, 0x00, 0x0c, 0x00, 0x50, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x1c, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x73, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x31, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0x10, 0x02, 0x00, 0x00,
+ 0x7f, 0x00, 0x00, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2e, 0x00,
+ 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x69, 0x00,
+ 0x64, 0x00, 0x2e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00,
+ 0x2e, 0x00, 0x6f, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
+ 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x02, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x44, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x00, 0x00
+};
+unsigned int override_arsc_len = 592;
diff --git a/libs/androidfw/tests/data/override/res/values/values.xml b/libs/androidfw/tests/data/override/res/values/values.xml
new file mode 100644
index 0000000..7b607ef
--- /dev/null
+++ b/libs/androidfw/tests/data/override/res/values/values.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="string1">string1</string>
+</resources>
diff --git a/libs/androidfw/tests/data/system/R.h b/libs/androidfw/tests/data/system/R.h
index 27f25fe..0f96bda 100644
--- a/libs/androidfw/tests/data/system/R.h
+++ b/libs/androidfw/tests/data/system/R.h
@@ -22,8 +22,11 @@ namespace R {
namespace attr {
enum {
- background = 0x01010000, // default
- foreground = 0x01010001, // default
+ background = 0x01010000, // default
+ foreground = 0x01010001, // default
+ some_dimen = 0x01010002, // default
+ another_dimen = 0x01010003, // default
+ windowNoTitle = 0x01010056, // default
};
}
diff --git a/libs/androidfw/tests/data/system/res/values/filler.xml b/libs/androidfw/tests/data/system/res/values/filler.xml
new file mode 100644
index 0000000..27af8dc
--- /dev/null
+++ b/libs/androidfw/tests/data/system/res/values/filler.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Filler so we can test the protected attribute "windowNoTitle" -->
+ <java-symbol name="dummyAttr04" type="attr" id="0x01010004" />
+ <java-symbol name="dummyAttr05" type="attr" id="0x01010005" />
+ <java-symbol name="dummyAttr06" type="attr" id="0x01010006" />
+ <java-symbol name="dummyAttr07" type="attr" id="0x01010007" />
+ <java-symbol name="dummyAttr08" type="attr" id="0x01010008" />
+ <java-symbol name="dummyAttr09" type="attr" id="0x01010009" />
+ <java-symbol name="dummyAttr0a" type="attr" id="0x0101000a" />
+ <java-symbol name="dummyAttr0b" type="attr" id="0x0101000b" />
+ <java-symbol name="dummyAttr0c" type="attr" id="0x0101000c" />
+ <java-symbol name="dummyAttr0d" type="attr" id="0x0101000d" />
+ <java-symbol name="dummyAttr0e" type="attr" id="0x0101000e" />
+ <java-symbol name="dummyAttr0f" type="attr" id="0x0101000f" />
+ <java-symbol name="dummyAttr10" type="attr" id="0x01010010" />
+ <java-symbol name="dummyAttr11" type="attr" id="0x01010011" />
+ <java-symbol name="dummyAttr12" type="attr" id="0x01010012" />
+ <java-symbol name="dummyAttr13" type="attr" id="0x01010013" />
+ <java-symbol name="dummyAttr14" type="attr" id="0x01010014" />
+ <java-symbol name="dummyAttr15" type="attr" id="0x01010015" />
+ <java-symbol name="dummyAttr16" type="attr" id="0x01010016" />
+ <java-symbol name="dummyAttr17" type="attr" id="0x01010017" />
+ <java-symbol name="dummyAttr18" type="attr" id="0x01010018" />
+ <java-symbol name="dummyAttr19" type="attr" id="0x01010019" />
+ <java-symbol name="dummyAttr1a" type="attr" id="0x0101001a" />
+ <java-symbol name="dummyAttr1b" type="attr" id="0x0101001b" />
+ <java-symbol name="dummyAttr1c" type="attr" id="0x0101001c" />
+ <java-symbol name="dummyAttr1d" type="attr" id="0x0101001d" />
+ <java-symbol name="dummyAttr1e" type="attr" id="0x0101001e" />
+ <java-symbol name="dummyAttr1f" type="attr" id="0x0101001f" />
+ <java-symbol name="dummyAttr20" type="attr" id="0x01010020" />
+ <java-symbol name="dummyAttr21" type="attr" id="0x01010021" />
+ <java-symbol name="dummyAttr22" type="attr" id="0x01010022" />
+ <java-symbol name="dummyAttr23" type="attr" id="0x01010023" />
+ <java-symbol name="dummyAttr24" type="attr" id="0x01010024" />
+ <java-symbol name="dummyAttr25" type="attr" id="0x01010025" />
+ <java-symbol name="dummyAttr26" type="attr" id="0x01010026" />
+ <java-symbol name="dummyAttr27" type="attr" id="0x01010027" />
+ <java-symbol name="dummyAttr28" type="attr" id="0x01010028" />
+ <java-symbol name="dummyAttr29" type="attr" id="0x01010029" />
+ <java-symbol name="dummyAttr2a" type="attr" id="0x0101002a" />
+ <java-symbol name="dummyAttr2b" type="attr" id="0x0101002b" />
+ <java-symbol name="dummyAttr2c" type="attr" id="0x0101002c" />
+ <java-symbol name="dummyAttr2d" type="attr" id="0x0101002d" />
+ <java-symbol name="dummyAttr2e" type="attr" id="0x0101002e" />
+ <java-symbol name="dummyAttr2f" type="attr" id="0x0101002f" />
+ <java-symbol name="dummyAttr30" type="attr" id="0x01010030" />
+ <java-symbol name="dummyAttr31" type="attr" id="0x01010031" />
+ <java-symbol name="dummyAttr32" type="attr" id="0x01010032" />
+ <java-symbol name="dummyAttr33" type="attr" id="0x01010033" />
+ <java-symbol name="dummyAttr34" type="attr" id="0x01010034" />
+ <java-symbol name="dummyAttr35" type="attr" id="0x01010035" />
+ <java-symbol name="dummyAttr36" type="attr" id="0x01010036" />
+ <java-symbol name="dummyAttr37" type="attr" id="0x01010037" />
+ <java-symbol name="dummyAttr38" type="attr" id="0x01010038" />
+ <java-symbol name="dummyAttr39" type="attr" id="0x01010039" />
+ <java-symbol name="dummyAttr3a" type="attr" id="0x0101003a" />
+ <java-symbol name="dummyAttr3b" type="attr" id="0x0101003b" />
+ <java-symbol name="dummyAttr3c" type="attr" id="0x0101003c" />
+ <java-symbol name="dummyAttr3d" type="attr" id="0x0101003d" />
+ <java-symbol name="dummyAttr3e" type="attr" id="0x0101003e" />
+ <java-symbol name="dummyAttr3f" type="attr" id="0x0101003f" />
+ <java-symbol name="dummyAttr40" type="attr" id="0x01010040" />
+ <java-symbol name="dummyAttr41" type="attr" id="0x01010041" />
+ <java-symbol name="dummyAttr42" type="attr" id="0x01010042" />
+ <java-symbol name="dummyAttr43" type="attr" id="0x01010043" />
+ <java-symbol name="dummyAttr44" type="attr" id="0x01010044" />
+ <java-symbol name="dummyAttr45" type="attr" id="0x01010045" />
+ <java-symbol name="dummyAttr46" type="attr" id="0x01010046" />
+ <java-symbol name="dummyAttr47" type="attr" id="0x01010047" />
+ <java-symbol name="dummyAttr48" type="attr" id="0x01010048" />
+ <java-symbol name="dummyAttr49" type="attr" id="0x01010049" />
+ <java-symbol name="dummyAttr4a" type="attr" id="0x0101004a" />
+ <java-symbol name="dummyAttr4b" type="attr" id="0x0101004b" />
+ <java-symbol name="dummyAttr4c" type="attr" id="0x0101004c" />
+ <java-symbol name="dummyAttr4d" type="attr" id="0x0101004d" />
+ <java-symbol name="dummyAttr4e" type="attr" id="0x0101004e" />
+ <java-symbol name="dummyAttr4f" type="attr" id="0x0101004f" />
+ <java-symbol name="dummyAttr50" type="attr" id="0x01010050" />
+ <java-symbol name="dummyAttr51" type="attr" id="0x01010051" />
+ <java-symbol name="dummyAttr52" type="attr" id="0x01010052" />
+ <java-symbol name="dummyAttr53" type="attr" id="0x01010053" />
+ <java-symbol name="dummyAttr54" type="attr" id="0x01010054" />
+ <java-symbol name="dummyAttr55" type="attr" id="0x01010055" />
+ <attr name="dummyAttr04" format="reference"/>
+ <attr name="dummyAttr05" format="reference"/>
+ <attr name="dummyAttr06" format="reference"/>
+ <attr name="dummyAttr07" format="reference"/>
+ <attr name="dummyAttr08" format="reference"/>
+ <attr name="dummyAttr09" format="reference"/>
+ <attr name="dummyAttr0a" format="reference"/>
+ <attr name="dummyAttr0b" format="reference"/>
+ <attr name="dummyAttr0c" format="reference"/>
+ <attr name="dummyAttr0d" format="reference"/>
+ <attr name="dummyAttr0e" format="reference"/>
+ <attr name="dummyAttr0f" format="reference"/>
+ <attr name="dummyAttr10" format="reference"/>
+ <attr name="dummyAttr11" format="reference"/>
+ <attr name="dummyAttr12" format="reference"/>
+ <attr name="dummyAttr13" format="reference"/>
+ <attr name="dummyAttr14" format="reference"/>
+ <attr name="dummyAttr15" format="reference"/>
+ <attr name="dummyAttr16" format="reference"/>
+ <attr name="dummyAttr17" format="reference"/>
+ <attr name="dummyAttr18" format="reference"/>
+ <attr name="dummyAttr19" format="reference"/>
+ <attr name="dummyAttr1a" format="reference"/>
+ <attr name="dummyAttr1b" format="reference"/>
+ <attr name="dummyAttr1c" format="reference"/>
+ <attr name="dummyAttr1d" format="reference"/>
+ <attr name="dummyAttr1e" format="reference"/>
+ <attr name="dummyAttr1f" format="reference"/>
+ <attr name="dummyAttr20" format="reference"/>
+ <attr name="dummyAttr21" format="reference"/>
+ <attr name="dummyAttr22" format="reference"/>
+ <attr name="dummyAttr23" format="reference"/>
+ <attr name="dummyAttr24" format="reference"/>
+ <attr name="dummyAttr25" format="reference"/>
+ <attr name="dummyAttr26" format="reference"/>
+ <attr name="dummyAttr27" format="reference"/>
+ <attr name="dummyAttr28" format="reference"/>
+ <attr name="dummyAttr29" format="reference"/>
+ <attr name="dummyAttr2a" format="reference"/>
+ <attr name="dummyAttr2b" format="reference"/>
+ <attr name="dummyAttr2c" format="reference"/>
+ <attr name="dummyAttr2d" format="reference"/>
+ <attr name="dummyAttr2e" format="reference"/>
+ <attr name="dummyAttr2f" format="reference"/>
+ <attr name="dummyAttr30" format="reference"/>
+ <attr name="dummyAttr31" format="reference"/>
+ <attr name="dummyAttr32" format="reference"/>
+ <attr name="dummyAttr33" format="reference"/>
+ <attr name="dummyAttr34" format="reference"/>
+ <attr name="dummyAttr35" format="reference"/>
+ <attr name="dummyAttr36" format="reference"/>
+ <attr name="dummyAttr37" format="reference"/>
+ <attr name="dummyAttr38" format="reference"/>
+ <attr name="dummyAttr39" format="reference"/>
+ <attr name="dummyAttr3a" format="reference"/>
+ <attr name="dummyAttr3b" format="reference"/>
+ <attr name="dummyAttr3c" format="reference"/>
+ <attr name="dummyAttr3d" format="reference"/>
+ <attr name="dummyAttr3e" format="reference"/>
+ <attr name="dummyAttr3f" format="reference"/>
+ <attr name="dummyAttr40" format="reference"/>
+ <attr name="dummyAttr41" format="reference"/>
+ <attr name="dummyAttr42" format="reference"/>
+ <attr name="dummyAttr43" format="reference"/>
+ <attr name="dummyAttr44" format="reference"/>
+ <attr name="dummyAttr45" format="reference"/>
+ <attr name="dummyAttr46" format="reference"/>
+ <attr name="dummyAttr47" format="reference"/>
+ <attr name="dummyAttr48" format="reference"/>
+ <attr name="dummyAttr49" format="reference"/>
+ <attr name="dummyAttr4a" format="reference"/>
+ <attr name="dummyAttr4b" format="reference"/>
+ <attr name="dummyAttr4c" format="reference"/>
+ <attr name="dummyAttr4d" format="reference"/>
+ <attr name="dummyAttr4e" format="reference"/>
+ <attr name="dummyAttr4f" format="reference"/>
+ <attr name="dummyAttr50" format="reference"/>
+ <attr name="dummyAttr51" format="reference"/>
+ <attr name="dummyAttr52" format="reference"/>
+ <attr name="dummyAttr53" format="reference"/>
+ <attr name="dummyAttr54" format="reference"/>
+ <attr name="dummyAttr55" format="reference"/>
+</resources> \ No newline at end of file
diff --git a/libs/androidfw/tests/data/system/res/values/themes.xml b/libs/androidfw/tests/data/system/res/values/themes.xml
index 35d43c7..a426bd3 100644
--- a/libs/androidfw/tests/data/system/res/values/themes.xml
+++ b/libs/androidfw/tests/data/system/res/values/themes.xml
@@ -17,12 +17,20 @@
<resources>
<public name="background" type="attr" id="0x01010000"/>
<public name="foreground" type="attr" id="0x01010001"/>
+ <public name="someDimen" type="attr" id="0x01010002" />
+ <public name="anotherDimen" type="attr" id="0x01010003" />
+ <!-- attributes 0x01010004 to 0x01010055 are in filler.xml -->
+ <public name="windowNoTitle" type="attr" id="0x01010056" />
<public name="Theme.One" type="style" id="0x01020000"/>
<attr name="background" format="color|reference"/>
<attr name="foreground" format="color|reference"/>
+ <attr name="someDimen" format="dimension|reference"/>
+ <attr name="anotherDimen" format="dimension|reference"/>
+ <attr name="windowNoTitle" format="boolean|reference"/>
<style name="Theme.One" parent="">
<item name="android:background">#ff0000</item>
<item name="android:foreground">#000000</item>
+ <item name="android:windowNoTitle">true</item>
</style>
</resources>
diff --git a/libs/androidfw/tests/data/system/system_arsc.h b/libs/androidfw/tests/data/system/system_arsc.h
index 215ecae..e157a0e 100644
--- a/libs/androidfw/tests/data/system/system_arsc.h
+++ b/libs/androidfw/tests/data/system/system_arsc.h
@@ -1,8 +1,8 @@
unsigned char system_arsc[] = {
- 0x02, 0x00, 0x0c, 0x00, 0x18, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x0c, 0x00, 0x10, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xf0, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x01, 0xe8, 0x18, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x72, 0x00,
0x6f, 0x00, 0x69, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25,45 +25,514 @@ unsigned char system_arsc[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x40, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x74, 0x00, 0x74, 0x00,
0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x73, 0x00, 0x74, 0x00, 0x79, 0x00,
0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x00,
- 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x68, 0x0a, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
- 0x0a, 0x00, 0x62, 0x00, 0x61, 0x00, 0x63, 0x00, 0x6b, 0x00, 0x67, 0x00,
- 0x72, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x00, 0x00,
- 0x0a, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x65, 0x00, 0x67, 0x00,
- 0x72, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x00, 0x00,
- 0x09, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00,
- 0x2e, 0x00, 0x4f, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x02, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40,
- 0x01, 0x02, 0x44, 0x00, 0x84, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x46, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x96, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0xca, 0x00, 0x00, 0x00,
+ 0xe4, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00,
+ 0x32, 0x01, 0x00, 0x00, 0x4c, 0x01, 0x00, 0x00, 0x66, 0x01, 0x00, 0x00,
+ 0x80, 0x01, 0x00, 0x00, 0x9a, 0x01, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00,
+ 0xce, 0x01, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
+ 0x1c, 0x02, 0x00, 0x00, 0x36, 0x02, 0x00, 0x00, 0x50, 0x02, 0x00, 0x00,
+ 0x6a, 0x02, 0x00, 0x00, 0x84, 0x02, 0x00, 0x00, 0x9e, 0x02, 0x00, 0x00,
+ 0xb8, 0x02, 0x00, 0x00, 0xd2, 0x02, 0x00, 0x00, 0xec, 0x02, 0x00, 0x00,
+ 0x06, 0x03, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x3a, 0x03, 0x00, 0x00,
+ 0x54, 0x03, 0x00, 0x00, 0x6e, 0x03, 0x00, 0x00, 0x88, 0x03, 0x00, 0x00,
+ 0xa2, 0x03, 0x00, 0x00, 0xbc, 0x03, 0x00, 0x00, 0xd6, 0x03, 0x00, 0x00,
+ 0xf0, 0x03, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x24, 0x04, 0x00, 0x00,
+ 0x3e, 0x04, 0x00, 0x00, 0x58, 0x04, 0x00, 0x00, 0x72, 0x04, 0x00, 0x00,
+ 0x8c, 0x04, 0x00, 0x00, 0xa6, 0x04, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00,
+ 0xda, 0x04, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x0e, 0x05, 0x00, 0x00,
+ 0x28, 0x05, 0x00, 0x00, 0x42, 0x05, 0x00, 0x00, 0x5c, 0x05, 0x00, 0x00,
+ 0x76, 0x05, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0xaa, 0x05, 0x00, 0x00,
+ 0xc4, 0x05, 0x00, 0x00, 0xde, 0x05, 0x00, 0x00, 0xf8, 0x05, 0x00, 0x00,
+ 0x12, 0x06, 0x00, 0x00, 0x2c, 0x06, 0x00, 0x00, 0x46, 0x06, 0x00, 0x00,
+ 0x60, 0x06, 0x00, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x94, 0x06, 0x00, 0x00,
+ 0xae, 0x06, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00, 0xe2, 0x06, 0x00, 0x00,
+ 0xfc, 0x06, 0x00, 0x00, 0x16, 0x07, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00,
+ 0x4a, 0x07, 0x00, 0x00, 0x64, 0x07, 0x00, 0x00, 0x7e, 0x07, 0x00, 0x00,
+ 0x98, 0x07, 0x00, 0x00, 0xb2, 0x07, 0x00, 0x00, 0xcc, 0x07, 0x00, 0x00,
+ 0xe6, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00,
+ 0x34, 0x08, 0x00, 0x00, 0x4e, 0x08, 0x00, 0x00, 0x68, 0x08, 0x00, 0x00,
+ 0x82, 0x08, 0x00, 0x00, 0x9c, 0x08, 0x00, 0x00, 0xb6, 0x08, 0x00, 0x00,
+ 0xd4, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x62, 0x00, 0x61, 0x00, 0x63, 0x00,
+ 0x6b, 0x00, 0x67, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x6e, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x72, 0x00,
+ 0x65, 0x00, 0x67, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x6e, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x09, 0x00, 0x73, 0x00, 0x6f, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x44, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x6e, 0x00,
+ 0x00, 0x00, 0x0c, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x74, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x72, 0x00, 0x44, 0x00, 0x69, 0x00, 0x6d, 0x00,
+ 0x65, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x30, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x36, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x37, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x30, 0x00, 0x39, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x30, 0x00, 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x63, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00, 0x64, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x30, 0x00,
+ 0x65, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x30, 0x00, 0x66, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x31, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x33, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00,
+ 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x31, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x31, 0x00, 0x36, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x39, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00,
+ 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x31, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x31, 0x00, 0x63, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x65, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x31, 0x00, 0x66, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x32, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x35, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00,
+ 0x36, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x32, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x32, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x39, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x61, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x62, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x32, 0x00,
+ 0x63, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x32, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x32, 0x00, 0x65, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x32, 0x00, 0x66, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x31, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00,
+ 0x32, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x33, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x33, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x36, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x37, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00,
+ 0x38, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x33, 0x00, 0x39, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x33, 0x00, 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x63, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00, 0x64, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x33, 0x00,
+ 0x65, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x33, 0x00, 0x66, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x34, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x33, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00,
+ 0x34, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x34, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x34, 0x00, 0x36, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x39, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00,
+ 0x61, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x34, 0x00, 0x62, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x34, 0x00, 0x63, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x65, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x34, 0x00, 0x66, 0x00,
+ 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00,
+ 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x35, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00,
+ 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00,
+ 0x35, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00, 0x74, 0x00,
+ 0x72, 0x00, 0x35, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x64, 0x00,
+ 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00, 0x74, 0x00,
+ 0x74, 0x00, 0x72, 0x00, 0x35, 0x00, 0x33, 0x00, 0x00, 0x00, 0x0b, 0x00,
+ 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00, 0x41, 0x00,
+ 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x35, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x6d, 0x00, 0x79, 0x00,
+ 0x41, 0x00, 0x74, 0x00, 0x74, 0x00, 0x72, 0x00, 0x35, 0x00, 0x35, 0x00,
+ 0x00, 0x00, 0x0d, 0x00, 0x77, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x64, 0x00,
+ 0x6f, 0x00, 0x77, 0x00, 0x4e, 0x00, 0x6f, 0x00, 0x54, 0x00, 0x69, 0x00,
+ 0x74, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x00, 0x00, 0x09, 0x00, 0x54, 0x00,
+ 0x68, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x4f, 0x00,
+ 0x6e, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,
+ 0x6c, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x1c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x08, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
+ 0x01, 0x02, 0x44, 0x00, 0x24, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x57, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
+ 0x70, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00,
+ 0xc4, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00,
+ 0x18, 0x01, 0x00, 0x00, 0x34, 0x01, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00,
+ 0x6c, 0x01, 0x00, 0x00, 0x88, 0x01, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00,
+ 0xc0, 0x01, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00,
+ 0x14, 0x02, 0x00, 0x00, 0x30, 0x02, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00,
+ 0x68, 0x02, 0x00, 0x00, 0x84, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00,
+ 0xbc, 0x02, 0x00, 0x00, 0xd8, 0x02, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00,
+ 0x10, 0x03, 0x00, 0x00, 0x2c, 0x03, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00,
+ 0x64, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x9c, 0x03, 0x00, 0x00,
+ 0xb8, 0x03, 0x00, 0x00, 0xd4, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00,
+ 0x0c, 0x04, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00,
+ 0x60, 0x04, 0x00, 0x00, 0x7c, 0x04, 0x00, 0x00, 0x98, 0x04, 0x00, 0x00,
+ 0xb4, 0x04, 0x00, 0x00, 0xd0, 0x04, 0x00, 0x00, 0xec, 0x04, 0x00, 0x00,
+ 0x08, 0x05, 0x00, 0x00, 0x24, 0x05, 0x00, 0x00, 0x40, 0x05, 0x00, 0x00,
+ 0x5c, 0x05, 0x00, 0x00, 0x78, 0x05, 0x00, 0x00, 0x94, 0x05, 0x00, 0x00,
+ 0xb0, 0x05, 0x00, 0x00, 0xcc, 0x05, 0x00, 0x00, 0xe8, 0x05, 0x00, 0x00,
+ 0x04, 0x06, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00,
+ 0x58, 0x06, 0x00, 0x00, 0x74, 0x06, 0x00, 0x00, 0x90, 0x06, 0x00, 0x00,
+ 0xac, 0x06, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00, 0xe4, 0x06, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x38, 0x07, 0x00, 0x00,
+ 0x54, 0x07, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x8c, 0x07, 0x00, 0x00,
+ 0xa8, 0x07, 0x00, 0x00, 0xc4, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
+ 0xfc, 0x07, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00,
+ 0x50, 0x08, 0x00, 0x00, 0x6c, 0x08, 0x00, 0x00, 0x88, 0x08, 0x00, 0x00,
+ 0xa4, 0x08, 0x00, 0x00, 0xc0, 0x08, 0x00, 0x00, 0xdc, 0x08, 0x00, 0x00,
+ 0xf8, 0x08, 0x00, 0x00, 0x14, 0x09, 0x00, 0x00, 0x30, 0x09, 0x00, 0x00,
+ 0x4c, 0x09, 0x00, 0x00, 0x68, 0x09, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x00,
- 0x02, 0x02, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x02, 0x44, 0x00,
- 0x70, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x41, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x41, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x11, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x17, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x1a, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x1d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x23, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x26, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x3b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x41, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x44, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x47, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x4a, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x53, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x10,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x56, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x02, 0x02, 0x10, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x01, 0x02, 0x44, 0x00, 0x7c, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0xff, 0xff,
- 0x01, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x57, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff, 0x56, 0x00, 0x01, 0x01,
+ 0x08, 0x00, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff
};
-unsigned int system_arsc_len = 792;
+unsigned int system_arsc_len = 6416;
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 91e289c..fb9ac1e 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -2,6 +2,10 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+ifeq ($(TARGET_REQUIRES_SYNCHRONOUS_SETSURFACE),true)
+ LOCAL_CFLAGS += -DREQUIRES_SYNCHRONOUS_SETSURFACE
+endif
+
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE := libhwui
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 35051b7..54cfaea 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -683,14 +683,6 @@ bool FontRenderer::renderTextOnPath(const SkPaint* paint, const Rect* clip, cons
return mDrawn;
}
-void FontRenderer::removeFont(const Font* font) {
- mActiveFonts.remove(font->getDescription());
-
- if (mCurrentFont == font) {
- mCurrentFont = nullptr;
- }
-}
-
void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, float radius) {
uint32_t intRadius = Blur::convertRadiusToInt(radius);
#ifdef ANDROID_ENABLE_RENDERSCRIPT
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index dfb107c..3da20ee 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -151,8 +151,6 @@ private:
float x3, float y3, float u3, float v3,
float x4, float y4, float u4, float v4, CacheTexture* texture);
- void removeFont(const Font* font);
-
void checkTextureUpdate();
void setTextureDirty() {
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 2292ef4..88a6979 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -181,6 +181,16 @@ void OpenGLRenderer::discardFramebuffer(float left, float top, float right, floa
}
void OpenGLRenderer::clear(float left, float top, float right, float bottom, bool opaque) {
+#ifdef QCOM_HARDWARE
+ mRenderState.scissor().setEnabled(true);
+ mRenderState.scissor().set(left, getViewportHeight() - bottom, right - left, bottom - top);
+ glClear(GL_COLOR_BUFFER_BIT);
+ mDirty = true;
+ if (opaque) {
+ mRenderState.scissor().reset();
+ return;
+ }
+#else
if (!opaque) {
mRenderState.scissor().setEnabled(true);
mRenderState.scissor().set(left, getViewportHeight() - bottom, right - left, bottom - top);
@@ -190,6 +200,7 @@ void OpenGLRenderer::clear(float left, float top, float right, float bottom, boo
}
mRenderState.scissor().reset();
+#endif
}
void OpenGLRenderer::startTilingCurrentClip(bool opaque, bool expand) {
@@ -1699,6 +1710,7 @@ void OpenGLRenderer::drawPatch(const SkBitmap* bitmap, const Patch* mesh,
Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap);
if (!texture) return;
+ const AutoTexture autoCleanup(texture);
// 9 patches are built for stretching - always filter
int textureFillFlags = TextureFillFlags::ForceFilter;
@@ -2325,12 +2337,15 @@ void OpenGLRenderer::drawPath(const SkPath* path, const SkPaint* paint) {
PathTexture* texture = mCaches.pathCache.get(path, paint);
if (!texture) return;
- const AutoTexture autoCleanup(texture);
const float x = texture->left - texture->offset;
const float y = texture->top - texture->offset;
drawPathTexture(texture, x, y, paint);
+
+ if (texture->cleanup) {
+ mCaches.pathCache.remove(path, paint);
+ }
mDirty = true;
}
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 3af640f..3236f6f 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -400,6 +400,13 @@ PathTexture* PathCache::get(const SkPath* path, const SkPaint* paint) {
return texture;
}
+void PathCache::remove(const SkPath* path, const SkPaint* paint)
+{
+ PathDescription entry(kShapePath, paint);
+ entry.shape.path.mGenerationID = path->getGenerationID();
+ mCache.remove(entry);
+}
+
void PathCache::precache(const SkPath* path, const SkPaint* paint) {
if (!Caches::getInstance().tasks.canRunTasks()) {
return;
diff --git a/libs/hwui/PathCache.h b/libs/hwui/PathCache.h
index 7014863..c529915 100644
--- a/libs/hwui/PathCache.h
+++ b/libs/hwui/PathCache.h
@@ -201,6 +201,7 @@ public:
PathTexture* getArc(float width, float height, float startAngle, float sweepAngle,
bool useCenter, const SkPaint* paint);
PathTexture* get(const SkPath* path, const SkPaint* paint);
+ void remove(const SkPath* path, const SkPaint* paint);
/**
* Removes the specified path. This is meant to be called from threads
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
index 7a2b9af..5d36a03 100644
--- a/libs/hwui/SpotShadow.cpp
+++ b/libs/hwui/SpotShadow.cpp
@@ -742,7 +742,7 @@ inline void genNewPenumbraAndPairWithUmbra(const Vector2* penumbra, int penumbra
// vertex's location.
int newPenumbraNumber = indexDelta - 1;
- float accumulatedDeltaLength[newPenumbraNumber];
+ float accumulatedDeltaLength[indexDelta];
float totalDeltaLength = 0;
// To save time, cache the previous umbra vertex info outside the loop
diff --git a/libs/hwui/font/CacheTexture.cpp b/libs/hwui/font/CacheTexture.cpp
index d2685da..a767a4e 100644
--- a/libs/hwui/font/CacheTexture.cpp
+++ b/libs/hwui/font/CacheTexture.cpp
@@ -204,15 +204,21 @@ void CacheTexture::allocatePixelBuffer() {
bool CacheTexture::upload() {
const Rect& dirtyRect = mDirtyRect;
- uint32_t x = mHasUnpackRowLength ? dirtyRect.left : 0;
- uint32_t y = dirtyRect.top;
- uint32_t width = mHasUnpackRowLength ? dirtyRect.getWidth() : getWidth();
- uint32_t height = dirtyRect.getHeight();
+ // align the x direction to 32 and y direction to 4 for better performance
+ uint32_t x = (((uint32_t)dirtyRect.left) & (~0x1F));
+ uint32_t y = (((uint32_t)dirtyRect.top) & (~0x3));
+ uint32_t r = ((((uint32_t)dirtyRect.right) + 0x1F) & (~0x1F));
+ uint32_t b = ((((uint32_t)dirtyRect.bottom) + 0x3) & (~0x3));
+ uint32_t width = (r > getWidth() ? getWidth() : r) - x;
+ uint32_t height = (b > getHeight() ? getHeight() : b) - y;
// The unpack row length only needs to be specified when a new
// texture is bound
if (mHasUnpackRowLength) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, getWidth());
+ } else {
+ x = 0;
+ width = getWidth();
}
mPixelBuffer->upload(x, y, width, height);
diff --git a/libs/hwui/font/Font.cpp b/libs/hwui/font/Font.cpp
index 5de64a4..762f2bb 100644
--- a/libs/hwui/font/Font.cpp
+++ b/libs/hwui/font/Font.cpp
@@ -64,8 +64,6 @@ Font::FontDescription::FontDescription(const SkPaint* paint, const SkMatrix& ras
}
Font::~Font() {
- mState->removeFont(this);
-
for (uint32_t i = 0; i < mCachedGlyphs.size(); i++) {
delete mCachedGlyphs.valueAt(i);
}
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index 1e39bfa..84b6965 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -306,6 +306,10 @@ void RenderState::render(const Glop& glop) {
// Shader uniforms
SkiaShader::apply(*mCaches, fill.skiaShaderData);
+ Texture* texture = (fill.skiaShaderData.skiaShaderType & kBitmap_SkiaShaderType) ?
+ fill.skiaShaderData.bitmapData.bitmapTexture : nullptr;
+ const AutoTexture autoCleanup(texture);
+
// ------------------------------------
// ---------- GL state setup ----------
// ------------------------------------
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 4cf8b15..57e5832 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -110,12 +110,11 @@ void CanvasContext::setSwapBehavior(SwapBehavior swapBehavior) {
mSwapBehavior = swapBehavior;
}
-bool CanvasContext::initialize(ANativeWindow* window) {
+void CanvasContext::initialize(ANativeWindow* window) {
setSurface(window);
- if (mCanvas) return false;
+ if (mCanvas) return;
mCanvas = new OpenGLRenderer(mRenderThread.renderState());
mCanvas->initProperties();
- return true;
}
void CanvasContext::updateSurface(ANativeWindow* window) {
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index f2fa9cd..1e6f830 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -67,7 +67,7 @@ public:
// Won't take effect until next EGLSurface creation
void setSwapBehavior(SwapBehavior swapBehavior);
- bool initialize(ANativeWindow* window);
+ void initialize(ANativeWindow* window);
void updateSurface(ANativeWindow* window);
bool pauseSurface(ANativeWindow* window);
bool hasSurface() { return mNativeWindow.get(); }
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 6d9acd4..2214091 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -140,14 +140,19 @@ void RenderProxy::setName(const char* name) {
}
CREATE_BRIDGE2(initialize, CanvasContext* context, ANativeWindow* window) {
- return (void*) args->context->initialize(args->window);
+ args->context->initialize(args->window);
+ return nullptr;
}
-bool RenderProxy::initialize(const sp<ANativeWindow>& window) {
+void RenderProxy::initialize(const sp<ANativeWindow>& window) {
SETUP_TASK(initialize);
args->context = mContext;
args->window = window.get();
- return (bool) postAndWait(task);
+#ifdef REQUIRES_SYNCHRONOUS_SETSURFACE
+ postAndWait(task);
+#else
+ post(task);
+#endif
}
CREATE_BRIDGE2(updateSurface, CanvasContext* context, ANativeWindow* window) {
@@ -384,6 +389,12 @@ void RenderProxy::fence() {
postAndWait(task);
}
+void RenderProxy::staticFence() {
+ SETUP_TASK(fence);
+ UNUSED(args);
+ staticPostAndWait(task);
+}
+
CREATE_BRIDGE1(stopDrawing, CanvasContext* context) {
args->context->stopDrawing();
return nullptr;
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index 5febbe0..8a1f5bf 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -67,7 +67,7 @@ public:
ANDROID_API bool loadSystemProperties();
ANDROID_API void setName(const char* name);
- ANDROID_API bool initialize(const sp<ANativeWindow>& window);
+ ANDROID_API void initialize(const sp<ANativeWindow>& window);
ANDROID_API void updateSurface(const sp<ANativeWindow>& window);
ANDROID_API bool pauseSurface(const sp<ANativeWindow>& window);
ANDROID_API void setup(int width, int height, float lightRadius,
@@ -94,6 +94,7 @@ public:
ANDROID_API static void overrideProperty(const char* name, const char* value);
ANDROID_API void fence();
+ ANDROID_API static void staticFence();
ANDROID_API void stopDrawing();
ANDROID_API void notifyFramePending();
diff --git a/libs/storage/IMountService.cpp b/libs/storage/IMountService.cpp
index c643ed0..f7379b6 100644
--- a/libs/storage/IMountService.cpp
+++ b/libs/storage/IMountService.cpp
@@ -50,6 +50,7 @@ enum {
TRANSACTION_isExternalStorageEmulated,
TRANSACTION_decryptStorage,
TRANSACTION_encryptStorage,
+ TRANSACTION_encryptWipeStorage = IBinder::FIRST_CALL_TRANSACTION + 61,
};
class BpMountService: public BpInterface<IMountService>
@@ -551,6 +552,23 @@ public:
}
return reply.readInt32();
}
+
+ int32_t encryptWipeStorage(const String16& password)
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(IMountService::getInterfaceDescriptor());
+ data.writeString16(password);
+ if (remote()->transact(TRANSACTION_encryptWipeStorage, data, &reply) != NO_ERROR) {
+ ALOGD("encryptWipeStorage could not contact remote\n");
+ return -1;
+ }
+ int32_t err = reply.readExceptionCode();
+ if (err < 0) {
+ ALOGD("encryptWipeStorage caught exception %d\n", err);
+ return err;
+ }
+ return reply.readInt32();
+ }
};
IMPLEMENT_META_INTERFACE(MountService, "IMountService")