Lines Matching refs:assets

220 static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets,  in parsePackage()  argument
263 assets->setPackage(String8(block.getAttributeStringValue(nameIndex, &len))); in parsePackage()
293 static status_t makeFileResources(Bundle* bundle, const sp<AaptAssets>& assets, in makeFileResources() argument
326 String16(assets->getPackage()), in makeFileResources()
335 assets->addResource(it.getLeafName(), resPath, it.getFile(), type8); in makeFileResources()
344 PreProcessImageWorkUnit(const Bundle* bundle, const sp<AaptAssets>& assets, in PreProcessImageWorkUnit() argument
346 mBundle(bundle), mAssets(assets), mFile(file), mHasErrors(hasErrors) { in PreProcessImageWorkUnit()
364 static status_t preProcessImages(const Bundle* bundle, const sp<AaptAssets>& assets, in preProcessImages() argument
374 bundle, assets, it.getFile(), &hasErrors); in preProcessImages()
594 const sp<AaptAssets>& assets, in applyFileOverlay() argument
604 sp<AaptAssets> overlay = assets->getOverlay(); in applyFileOverlay()
673 assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex)); in applyFileOverlay()
678 assets->getResources()->add(String8(resType), *baseSet); in applyFileOverlay()
691 assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex)); in applyFileOverlay()
1043 static int32_t getPlatformAssetCookie(const AssetManager& assets) { in getPlatformAssetCookie() argument
1047 const ResTable& table = assets.getResources(true); in getPlatformAssetCookie()
1131 static ssize_t extractPlatformBuildVersion(AssetManager& assets, Bundle* bundle) { in extractPlatformBuildVersion() argument
1132 int32_t cookie = getPlatformAssetCookie(assets); in extractPlatformBuildVersion()
1138 Asset* asset = assets.openNonAsset(cookie, "AndroidManifest.xml", Asset::ACCESS_STREAMING); in extractPlatformBuildVersion()
1154 result = extractPlatformBuildVersion(assets.getResources(true), tree, bundle); in extractPlatformBuildVersion()
1199 status_t generateAndroidManifestForSplit(Bundle* bundle, const sp<AaptAssets>& assets, in generateAndroidManifestForSplit() argument
1210 const char* packageName = assets->getPackage(); in generateAndroidManifestForSplit()
1248 int err = compileXmlFile(bundle, assets, String16(), root, outFile, table); in generateAndroidManifestForSplit()
1256 status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets, sp<ApkBuilder>& builder) in buildResources() argument
1261 assets->getFiles().valueFor(String8("AndroidManifest.xml")); in buildResources()
1267 status_t err = parsePackage(bundle, assets, androidManifestFile); in buildResources()
1273 printf("Creating resources for package %s\n", assets->getPackage().string()); in buildResources()
1279 assets->setSymbolsPrivatePackage(bundle->getPrivateSymbolsPackage()); in buildResources()
1291 ResourceTable table(bundle, String16(assets->getPackage()), packageType); in buildResources()
1292 err = table.addIncludedResources(bundle, assets); in buildResources()
1319 collect_files(assets, resources); in buildResources()
1347 assets->setResources(resources); in buildResources()
1349 sp<AaptAssets> current = assets->getOverlay(); in buildResources()
1358 if (!applyFileOverlay(bundle, assets, &drawables, "drawable") || in buildResources()
1359 !applyFileOverlay(bundle, assets, &layouts, "layout") || in buildResources()
1360 !applyFileOverlay(bundle, assets, &anims, "anim") || in buildResources()
1361 !applyFileOverlay(bundle, assets, &animators, "animator") || in buildResources()
1362 !applyFileOverlay(bundle, assets, &interpolators, "interpolator") || in buildResources()
1363 !applyFileOverlay(bundle, assets, &transitions, "transition") || in buildResources()
1364 !applyFileOverlay(bundle, assets, &xmls, "xml") || in buildResources()
1365 !applyFileOverlay(bundle, assets, &raws, "raw") || in buildResources()
1366 !applyFileOverlay(bundle, assets, &colors, "color") || in buildResources()
1367 !applyFileOverlay(bundle, assets, &menus, "menu") || in buildResources()
1368 !applyFileOverlay(bundle, assets, &fonts, "font") || in buildResources()
1369 !applyFileOverlay(bundle, assets, &mipmaps, "mipmap")) { in buildResources()
1377 err = preProcessImages(bundle, assets, drawables, "drawable"); in buildResources()
1380 err = makeFileResources(bundle, assets, &table, drawables, "drawable"); in buildResources()
1391 err = preProcessImages(bundle, assets, mipmaps, "mipmap"); in buildResources()
1394 err = makeFileResources(bundle, assets, &table, mipmaps, "mipmap"); in buildResources()
1404 err = makeFileResources(bundle, assets, &table, fonts, "font"); in buildResources()
1411 err = makeFileResources(bundle, assets, &table, layouts, "layout"); in buildResources()
1418 err = makeFileResources(bundle, assets, &table, anims, "anim"); in buildResources()
1425 err = makeFileResources(bundle, assets, &table, animators, "animator"); in buildResources()
1432 err = makeFileResources(bundle, assets, &table, transitions, "transition"); in buildResources()
1439 err = makeFileResources(bundle, assets, &table, interpolators, "interpolator"); in buildResources()
1446 err = makeFileResources(bundle, assets, &table, xmls, "xml"); in buildResources()
1453 err = makeFileResources(bundle, assets, &table, raws, "raw"); in buildResources()
1460 current = assets; in buildResources()
1471 res = compileResourceFile(bundle, assets, file, it.getParams(), in buildResources()
1472 (current!=assets), &table); in buildResources()
1482 err = makeFileResources(bundle, assets, &table, colors, "color"); in buildResources()
1489 err = makeFileResources(bundle, assets, &table, menus, "menu"); in buildResources()
1519 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1540 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1556 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1572 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1588 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1604 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1620 err = postProcessImage(bundle, assets, &table, it.getFile()); in buildResources()
1635 err = postProcessImage(bundle, assets, &table, it.getFile()); in buildResources()
1650 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1667 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1690 err = compileXmlFile(bundle, assets, String16(it.getBaseName()), in buildResources()
1714 err = compileXmlFile(bundle, assets, workItem.resourceName, workItem.xmlRoot, in buildResources()
1718 assets->addResource(workItem.resPath.getPathLeaf(), in buildResources()
1743 err = extractPlatformBuildVersion(assets->getAssetManager(), bundle); in buildResources()
1762 err = compileXmlFile(bundle, assets, String16(), manifestTree, manifestFile, &table); in buildResources()
1784 sp<AaptSymbols> symbols = assets->getSymbolsFor(String8("R")); in buildResources()
1879 err = generateAndroidManifestForSplit(bundle, assets, split, in buildResources()
1900 table.writePublicDefinitions(String16(assets->getPackage()), fp); in buildResources()
1917 err = compileXmlFile(bundle, assets, String16(), manifestFile, in buildResources()
1987 assets->getSymbolsFor(String8("Manifest")); in buildResources()
1995 assets->getSymbolsFor(String8("Manifest")); in buildResources()
2187 err = assets->addIncludedResources(resFile); in buildResources()
2222 static String8 getSymbolPackage(const String8& symbol, const sp<AaptAssets>& assets, bool pub) { in getSymbolPackage() argument
2227 return pub ? assets->getPackage() : assets->getSymbolsPrivatePackage(); in getSymbolPackage()
2238 static String16 getAttributeComment(const sp<AaptAssets>& assets, in getAttributeComment() argument
2242 sp<AaptSymbols> asym = assets->getSymbolsFor(String8("R")); in getAttributeComment()
2259 FILE* fp, const sp<AaptAssets>& assets, in writeResourceLoadedCallbackForLayoutClasses() argument
2263 String16 package16(assets->getPackage()); in writeResourceLoadedCallbackForLayoutClasses()
2288 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate, in writeResourceLoadedCallback() argument
2300 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeResourceLoadedCallback()
2316 fp, assets, nsymbols, indent, includePrivate); in writeResourceLoadedCallback()
2318 err = writeResourceLoadedCallback(fp, assets, includePrivate, nsymbols, in writeResourceLoadedCallback()
2330 FILE* fp, const sp<AaptAssets>& assets, in writeLayoutClasses() argument
2341 String16 package16(assets->getPackage()); in writeLayoutClasses()
2367 code = assets->getIncludedResources().identifierForName( in writeLayoutClasses()
2420 comment = getAttributeComment(assets, name8); in writeLayoutClasses()
2444 getSymbolPackage(name8, assets, true).string(), in writeLayoutClasses()
2498 comment = getAttributeComment(assets, name8, &typeComment); in writeLayoutClasses()
2500 getAttributeComment(assets, name8, &typeComment); in writeLayoutClasses()
2505 assets->getIncludedResources().identifierForName( in writeLayoutClasses()
2525 getSymbolPackage(name8, assets, pub).string(), in writeLayoutClasses()
2540 getSymbolPackage(name8, assets, true).string(), in writeLayoutClasses()
2548 getSymbolPackage(name8, assets, pub).string(), in writeLayoutClasses()
2571 FILE* fp, const sp<AaptAssets>& assets, in writeTextLayoutClasses() argument
2575 String16 package16(assets->getPackage()); in writeTextLayoutClasses()
2600 code = assets->getIncludedResources().identifierForName( in writeTextLayoutClasses()
2640 comment = getAttributeComment(assets, name8, &typeComment); in writeTextLayoutClasses()
2642 getAttributeComment(assets, name8, &typeComment); in writeTextLayoutClasses()
2647 assets->getIncludedResources().identifierForName( in writeTextLayoutClasses()
2667 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate, in writeSymbolClass() argument
2689 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeSymbolClass()
2731 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeSymbolClass()
2761 err = writeSymbolClass(fp, assets, includePrivate, nsymbols, nclassName, in writeSymbolClass()
2770 … err = writeLayoutClasses(fp, assets, styleableSymbols, indent, includePrivate, nonConstantId); in writeSymbolClass()
2779 writeResourceLoadedCallback(fp, assets, includePrivate, symbols, className, indent + 1); in writeSymbolClass()
2789 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate, in writeTextSymbolClass() argument
2802 if (!assets->isJavaSymbol(sym, includePrivate)) { in writeTextSymbolClass()
2817 err = writeTextLayoutClasses(fp, assets, nsymbols, includePrivate); in writeTextSymbolClass()
2819 err = writeTextSymbolClass(fp, assets, includePrivate, nsymbols, nclassName); in writeTextSymbolClass()
2829 status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets, in writeResourceSymbols() argument
2839 const size_t N = assets->getSymbols().size(); in writeResourceSymbols()
2841 sp<AaptSymbols> symbols = assets->getSymbols().valueAt(i); in writeResourceSymbols()
2842 String8 className(assets->getSymbols().keyAt(i)); in writeResourceSymbols()
2885 status_t err = writeSymbolClass(fp, assets, includePrivate, symbols, in writeResourceSymbols()
2907 status_t err = writeTextSymbolClass(fp, assets, includePrivate, symbols, in writeResourceSymbols()
3002 writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& assets, bool mainDex) in writeProguardForAndroidManifest() argument
3018 assGroup = assets->getFiles().valueFor(String8("AndroidManifest.xml")); in writeProguardForAndroidManifest()
3224 writeProguardForLayouts(ProguardKeepSet* keep, const sp<AaptAssets>& assets) in writeProguardForLayouts() argument
3248 const Vector<sp<AaptDir> >& dirs = assets->resDirs(); in writeProguardForLayouts()
3286 sp<AaptAssets> overlay = assets->getOverlay(); in writeProguardForLayouts()
3320 writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets) in writeProguardFile() argument
3330 err = writeProguardForAndroidManifest(&keep, assets, false); in writeProguardFile()
3335 err = writeProguardForLayouts(&keep, assets); in writeProguardFile()
3344 writeMainDexProguardFile(Bundle* bundle, const sp<AaptAssets>& assets) in writeMainDexProguardFile() argument
3354 err = writeProguardForAndroidManifest(&keep, assets, true); in writeMainDexProguardFile()
3376 writeDependencyPreReqs(Bundle* /* bundle */, const sp<AaptAssets>& assets, FILE* fp, bool includeRa… in writeDependencyPreReqs() argument
3379 deps += writePathsToFile(assets->getFullResPaths(), fp); in writeDependencyPreReqs()
3381 deps += writePathsToFile(assets->getFullAssetPaths(), fp); in writeDependencyPreReqs()