Lines Matching refs:assets
215 static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets, in parsePackage() argument
258 assets->setPackage(String8(block.getAttributeStringValue(nameIndex, &len))); in parsePackage()
288 static status_t makeFileResources(Bundle* bundle, const sp<AaptAssets>& assets, in makeFileResources() argument
320 table->addEntry(SourcePos(it.getPath(), 0), String16(assets->getPackage()), in makeFileResources()
326 assets->addResource(it.getLeafName(), resPath, it.getFile(), type8); in makeFileResources()
334 PreProcessImageWorkUnit(const Bundle* bundle, const sp<AaptAssets>& assets, in PreProcessImageWorkUnit() argument
336 mBundle(bundle), mAssets(assets), mFile(file), mHasErrors(hasErrors) { in PreProcessImageWorkUnit()
354 static status_t preProcessImages(const Bundle* bundle, const sp<AaptAssets>& assets, in preProcessImages() argument
364 bundle, assets, it.getFile(), &hasErrors); in preProcessImages()
572 const sp<AaptAssets>& assets, in applyFileOverlay() argument
582 sp<AaptAssets> overlay = assets->getOverlay(); in applyFileOverlay()
651 assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex)); in applyFileOverlay()
656 assets->getResources()->add(String8(resType), *baseSet); in applyFileOverlay()
669 assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex)); in applyFileOverlay()
922 static int32_t getPlatformAssetCookie(const AssetManager& assets) { in getPlatformAssetCookie() argument
926 const ResTable& table = assets.getResources(true); in getPlatformAssetCookie()
996 static ssize_t extractPlatformBuildVersion(AssetManager& assets, Bundle* bundle) { in extractPlatformBuildVersion() argument
997 int32_t cookie = getPlatformAssetCookie(assets); in extractPlatformBuildVersion()
1004 Asset* asset = assets.openNonAsset(cookie, "AndroidManifest.xml", Asset::ACCESS_STREAMING); in extractPlatformBuildVersion()
1059 status_t generateAndroidManifestForSplit(Bundle* bundle, const sp<AaptAssets>& assets, in generateAndroidManifestForSplit() argument
1070 const char* packageName = assets->getPackage(); in generateAndroidManifestForSplit()
1108 int err = compileXmlFile(bundle, assets, String16(), root, outFile, table); in generateAndroidManifestForSplit()
1116 status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets, sp<ApkBuilder>& builder) in buildResources() argument
1121 assets->getFiles().valueFor(String8("AndroidManifest.xml")); in buildResources()
1127 status_t err = parsePackage(bundle, assets, androidManifestFile); in buildResources()
1133 assets->getPackage().string())); in buildResources()
1144 ResourceTable table(bundle, String16(assets->getPackage()), packageType); in buildResources()
1145 err = table.addIncludedResources(bundle, assets); in buildResources()
1170 collect_files(assets, resources); in buildResources()
1196 assets->setResources(resources); in buildResources()
1198 sp<AaptAssets> current = assets->getOverlay(); in buildResources()
1207 if (!applyFileOverlay(bundle, assets, &drawables, "drawable") || in buildResources()
1208 !applyFileOverlay(bundle, assets, &layouts, "layout") || in buildResources()
1209 !applyFileOverlay(bundle, assets, &anims, "anim") || in buildResources()
1210 !applyFileOverlay(bundle, assets, &animators, "animator") || in buildResources()
1211 !applyFileOverlay(bundle, assets, &interpolators, "interpolator") || in buildResources()
1212 !applyFileOverlay(bundle, assets, &transitions, "transition") || in buildResources()
1213 !applyFileOverlay(bundle, assets, &xmls, "xml") || in buildResources()
1214 !applyFileOverlay(bundle, assets, &raws, "raw") || in buildResources()
1215 !applyFileOverlay(bundle, assets, &colors, "color") || in buildResources()
1216 !applyFileOverlay(bundle, assets, &menus, "menu") || in buildResources()
1217 !applyFileOverlay(bundle, assets, &mipmaps, "mipmap")) { in buildResources()
1225 err = preProcessImages(bundle, assets, drawables, "drawable"); in buildResources()
1228 err = makeFileResources(bundle, assets, &table, drawables, "drawable"); in buildResources()
1239 err = preProcessImages(bundle, assets, mipmaps, "mipmap"); in buildResources()
1242 err = makeFileResources(bundle, assets, &table, mipmaps, "mipmap"); in buildResources()
1252 err = makeFileResources(bundle, assets, &table, layouts, "layout"); in buildResources()
1259 err = makeFileResources(bundle, assets, &table, anims, "anim"); in buildResources()
1266 err = makeFileResources(bundle, assets, &table, animators, "animator"); in buildResources()
1273 err = makeFileResources(bundle, assets, &table, transitions, "transition"); in buildResources()
1280 err = makeFileResources(bundle, assets, &table, interpolators, "interpolator"); in buildResources()
1287 err = makeFileResources(bundle, assets, &table, xmls, "xml"); in buildResources()
1294 err = makeFileResources(bundle, assets, &table, raws, "raw"); in buildResources()
1301 current = assets; in buildResources()
1312 res = compileResourceFile(bundle, assets, file, it.getParams(), in buildResources()
1313 (current!=assets), &table); in buildResources()
1323 err = makeFileResources(bundle, assets, &table, colors, "color"); in buildResources()
1330 err = makeFileResources(bundle, assets, &table, menus, "menu"); in buildResources()
1356 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1376 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1392 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1408 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1424 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1440 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1456 err = postProcessImage(bundle, assets, &table, it.getFile()); in buildResources()
1471 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1488 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1509 … err = compileXmlFile(bundle, assets, workItem.resourceName, workItem.file, &table, xmlFlags); in buildResources()
1511 assets->addResource(workItem.resPath.getPathLeaf(), in buildResources()
1534 err = extractPlatformBuildVersion(assets->getAssetManager(), bundle); in buildResources()
1553 err = compileXmlFile(bundle, assets, String16(), manifestTree, manifestFile, &table); in buildResources()
1575 sp<AaptSymbols> symbols = assets->getSymbolsFor(String8("R")); in buildResources()
1670 err = generateAndroidManifestForSplit(bundle, assets, split, in buildResources()
1691 table.writePublicDefinitions(String16(assets->getPackage()), fp); in buildResources()
1708 err = compileXmlFile(bundle, assets, String16(), manifestFile, in buildResources()
1780 assets->getSymbolsFor(String8("Manifest")); in buildResources()
1788 assets->getSymbolsFor(String8("Manifest")); in buildResources()
1982 err = assets->addIncludedResources(resFile); in buildResources()
2017 static String8 getSymbolPackage(const String8& symbol, const sp<AaptAssets>& assets, bool pub) { in getSymbolPackage() argument
2022 return pub ? assets->getPackage() : assets->getSymbolsPrivatePackage(); in getSymbolPackage()
2033 static String16 getAttributeComment(const sp<AaptAssets>& assets, in getAttributeComment() argument
2037 sp<AaptSymbols> asym = assets->getSymbolsFor(String8("R")); in getAttributeComment()
2054 FILE* fp, const sp<AaptAssets>& assets, in writeResourceLoadedCallbackForLayoutClasses() argument
2058 String16 package16(assets->getPackage()); in writeResourceLoadedCallbackForLayoutClasses()
2083 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate, in writeResourceLoadedCallback() argument
2095 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeResourceLoadedCallback()
2111 fp, assets, nsymbols, indent, includePrivate); in writeResourceLoadedCallback()
2113 err = writeResourceLoadedCallback(fp, assets, includePrivate, nsymbols, in writeResourceLoadedCallback()
2125 FILE* fp, const sp<AaptAssets>& assets, in writeLayoutClasses() argument
2136 String16 package16(assets->getPackage()); in writeLayoutClasses()
2162 code = assets->getIncludedResources().identifierForName( in writeLayoutClasses()
2215 comment = getAttributeComment(assets, name8); in writeLayoutClasses()
2236 getSymbolPackage(name8, assets, true).string(), in writeLayoutClasses()
2290 comment = getAttributeComment(assets, name8, &typeComment); in writeLayoutClasses()
2292 getAttributeComment(assets, name8, &typeComment); in writeLayoutClasses()
2297 assets->getIncludedResources().identifierForName( in writeLayoutClasses()
2317 getSymbolPackage(name8, assets, pub).string(), in writeLayoutClasses()
2332 getSymbolPackage(name8, assets, true).string(), in writeLayoutClasses()
2340 getSymbolPackage(name8, assets, pub).string(), in writeLayoutClasses()
2363 FILE* fp, const sp<AaptAssets>& assets, in writeTextLayoutClasses() argument
2367 String16 package16(assets->getPackage()); in writeTextLayoutClasses()
2392 code = assets->getIncludedResources().identifierForName( in writeTextLayoutClasses()
2432 comment = getAttributeComment(assets, name8, &typeComment); in writeTextLayoutClasses()
2434 getAttributeComment(assets, name8, &typeComment); in writeTextLayoutClasses()
2439 assets->getIncludedResources().identifierForName( in writeTextLayoutClasses()
2459 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate, in writeSymbolClass() argument
2481 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeSymbolClass()
2497 assets->getPackage().string(), className.string(), in writeSymbolClass()
2527 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeSymbolClass()
2543 assets->getPackage().string(), className.string(), in writeSymbolClass()
2561 err = writeSymbolClass(fp, assets, includePrivate, nsymbols, nclassName, in writeSymbolClass()
2570 … err = writeLayoutClasses(fp, assets, styleableSymbols, indent, includePrivate, nonConstantId); in writeSymbolClass()
2579 writeResourceLoadedCallback(fp, assets, includePrivate, symbols, className, indent + 1); in writeSymbolClass()
2589 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate, in writeTextSymbolClass() argument
2602 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeTextSymbolClass()
2617 err = writeTextLayoutClasses(fp, assets, nsymbols, includePrivate); in writeTextSymbolClass()
2619 err = writeTextSymbolClass(fp, assets, includePrivate, nsymbols, nclassName); in writeTextSymbolClass()
2629 status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets, in writeResourceSymbols() argument
2639 const size_t N = assets->getSymbols().size(); in writeResourceSymbols()
2641 sp<AaptSymbols> symbols = assets->getSymbols().valueAt(i); in writeResourceSymbols()
2642 String8 className(assets->getSymbols().keyAt(i)); in writeResourceSymbols()
2685 status_t err = writeSymbolClass(fp, assets, includePrivate, symbols, in writeResourceSymbols()
2707 status_t err = writeTextSymbolClass(fp, assets, includePrivate, symbols, in writeResourceSymbols()
2802 writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& assets) in writeProguardForAndroidManifest() argument
2817 assGroup = assets->getFiles().valueFor(String8("AndroidManifest.xml")); in writeProguardForAndroidManifest()
2998 writeProguardForLayouts(ProguardKeepSet* keep, const sp<AaptAssets>& assets) in writeProguardForLayouts() argument
3022 const Vector<sp<AaptDir> >& dirs = assets->resDirs(); in writeProguardForLayouts()
3061 sp<AaptAssets> overlay = assets->getOverlay(); in writeProguardForLayouts()
3070 writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets) in writeProguardFile() argument
3080 err = writeProguardForAndroidManifest(&keep, assets); in writeProguardFile()
3085 err = writeProguardForLayouts(&keep, assets); in writeProguardFile()
3126 writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, FILE* fp, bool includeRaw) in writeDependencyPreReqs() argument
3129 deps += writePathsToFile(assets->getFullResPaths(), fp); in writeDependencyPreReqs()
3131 deps += writePathsToFile(assets->getFullAssetPaths(), fp); in writeDependencyPreReqs()