Home | History | Annotate | Download | only in aapt

Lines Matching refs:assets

4 // Build resource files from raw assets.
181 static sp<AaptFile> getResourceFile(const sp<AaptAssets>& assets, bool makeIfNecessary=true)
183 sp<AaptGroup> group = assets->getFiles().valueFor(String8("resources.arsc"));
195 return assets->addFile(String8("resources.arsc"), AaptGroupEntry(), String8(),
199 static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets,
242 assets->setPackage(String8(block.getAttributeStringValue(nameIndex, &len)));
267 static status_t makeFileResources(Bundle* bundle, const sp<AaptAssets>& assets,
299 table->addEntry(SourcePos(it.getPath(), 0), String16(assets->getPackage()),
305 assets->addResource(it.getLeafName(), resPath, it.getFile(), type8);
313 PreProcessImageWorkUnit(const Bundle* bundle, const sp<AaptAssets>& assets,
315 mBundle(bundle), mAssets(assets), mFile(file), mHasErrors(hasErrors) {
333 static status_t preProcessImages(const Bundle* bundle, const sp<AaptAssets>& assets,
343 bundle, assets, it.getFile(), &hasErrors);
361 status_t postProcessImages(const sp<AaptAssets>& assets,
369 res = postProcessImage(assets, table, it.getFile());
568 const sp<AaptAssets>& assets,
578 sp<AaptAssets> overlay = assets->getOverlay();
647 assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex));
652 assets->getResources()->add(String8(resType), *baseSet);
665 assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex));
884 status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
889 assets->getFiles().valueFor(String8("AndroidManifest.xml"));
895 status_t err = parsePackage(bundle, assets, androidManifestFile);
901 assets->getPackage().string()));
903 ResourceTable table(bundle, String16(assets->getPackage()));
904 err = table.addIncludedResources(bundle, assets);
929 collect_files(assets, resources);
955 assets->setResources(resources);
957 sp<AaptAssets> current = assets->getOverlay();
966 if (!applyFileOverlay(bundle, assets, &drawables, "drawable") ||
967 !applyFileOverlay(bundle, assets, &layouts, "layout") ||
968 !applyFileOverlay(bundle, assets, &anims, "anim") ||
969 !applyFileOverlay(bundle, assets, &animators, "animator") ||
970 !applyFileOverlay(bundle, assets, &interpolators, "interpolator") ||
971 !applyFileOverlay(bundle, assets, &transitions, "transition") ||
972 !applyFileOverlay(bundle, assets, &xmls, "xml") ||
973 !applyFileOverlay(bundle, assets, &raws, "raw") ||
974 !applyFileOverlay(bundle, assets, &colors, "color") ||
975 !applyFileOverlay(bundle, assets, &menus, "menu") ||
976 !applyFileOverlay(bundle, assets, &mipmaps, "mipmap")) {
984 err = preProcessImages(bundle, assets, drawables, "drawable");
987 err = makeFileResources(bundle, assets, &table, drawables, "drawable");
998 err = preProcessImages(bundle, assets, mipmaps, "mipmap");
1001 err = makeFileResources(bundle, assets, &table, mipmaps, "mipmap");
1011 err = makeFileResources(bundle, assets, &table, layouts, "layout");
1018 err = makeFileResources(bundle, assets, &table, anims, "anim");
1025 err = makeFileResources(bundle, assets, &table, animators, "animator");
1032 err = makeFileResources(bundle, assets, &table, transitions, "transition");
1039 err = makeFileResources(bundle, assets, &table, interpolators, "interpolator");
1046 err = makeFileResources(bundle, assets, &table, xmls, "xml");
1053 err = makeFileResources(bundle, assets, &table, raws, "raw");
1060 current = assets;
1071 res = compileResourceFile(bundle, assets, file, it.getParams(),
1072 (current!=assets), &table);
1082 err = makeFileResources(bundle, assets, &table, colors, "color");
1089 err = makeFileResources(bundle, assets, &table, menus, "menu");
1100 sp<AaptFile> resFile(getResourceFile(assets));
1121 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1140 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1155 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1170 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1185 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1200 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1213 err = postProcessImages(assets, &table, drawables);
1222 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1238 err = compileXmlFile(assets, it.getFile(), &table, xmlFlags);
1274 err = compileXmlFile(assets, manifestTree, manifestFile, &table);
1291 sp<AaptSymbols> symbols = assets->getSymbolsFor(String8("R"));
1297 resFile = getResourceFile(assets);
1318 table.writePublicDefinitions(String16(assets->getPackage()), fp);
1340 err = compileXmlFile(assets, manifestFile,
1410 assets->getSymbolsFor(String8("Manifest"));
1418 assets->getSymbolsFor(String8("Manifest"));
1579 err = assets->addIncludedResources(resFile);
1614 static String8 getSymbolPackage(const String8& symbol, const sp<AaptAssets>& assets, bool pub) {
1619 return pub ? assets->getPackage() : assets->getSymbolsPrivatePackage();
1630 static String16 getAttributeComment(const sp<AaptAssets>& assets,
1634 sp<AaptSymbols> asym = assets->getSymbolsFor(String8("R"));
1651 FILE* fp, const sp<AaptAssets>& assets,
1662 String16 package16(assets->getPackage());
1688 code = assets->getIncludedResources().identifierForName(
1744 comment = getAttributeComment(assets, name8);
1765 getSymbolPackage(name8, assets, true).string(),
1821 comment = getAttributeComment(assets, name8, &typeComment);
1823 getAttributeComment(assets, name8, &typeComment);
1828 assets->getIncludedResources().identifierForName(
1851 getSymbolPackage(name8, assets, pub).string(),
1868 getSymbolPackage(name8, assets, true).string(),
1876 getSymbolPackage(name8, assets, pub).string(),
1896 FILE* fp, const sp<AaptAssets>& assets,
1900 String16 package16(assets->getPackage());
1925 code = assets->getIncludedResources().identifierForName(
1965 comment = getAttributeComment(assets, name8, &typeComment);
1967 getAttributeComment(assets, name8, &typeComment);
1972 assets->getIncludedResources().identifierForName(
1992 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate,
2014 if (!assets->isJavaSymbol(sym, includePrivate)) {
2032 assets->getPackage().string(), className.string(),
2066 if (!assets->isJavaSymbol(sym, includePrivate)) {
2084 assets->getPackage().string(), className.string(),
2104 err = writeSymbolClass(fp, assets, includePrivate, nsymbols, nclassName, indent, nonConstantId);
2112 err = writeLayoutClasses(fp, assets, styleableSymbols, indent, includePrivate);
2124 FILE* fp, const sp<AaptAssets>& assets, bool includePrivate,
2137 if (!assets->isJavaSymbol(sym, includePrivate)) {
2152 err = writeTextLayoutClasses(fp, assets, nsymbols, includePrivate);
2154 err = writeTextSymbolClass(fp, assets, includePrivate, nsymbols, nclassName);
2164 status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets,
2174 const size_t N = assets->getSymbols().size();
2176 sp<AaptSymbols> symbols = assets->getSymbols().valueAt(i);
2177 String8 className(assets->getSymbols().keyAt(i));
2220 status_t err = writeSymbolClass(fp, assets, includePrivate, symbols,
2242 status_t err = writeTextSymbolClass(fp, assets, includePrivate, symbols,
2337 writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& assets)
2352 assGroup = assets->getFiles().valueFor(String8("AndroidManifest.xml"));
2529 writeProguardForLayouts(ProguardKeepSet* keep, const sp<AaptAssets>& assets)
2544 const Vector<sp<AaptDir> >& dirs = assets->resDirs();
2578 sp<AaptAssets> overlay = assets->getOverlay();
2587 writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets)
2597 err = writeProguardForAndroidManifest(&keep, assets);
2602 err = writeProguardForLayouts(&keep, assets);
2643 writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, FILE* fp, bool includeRaw)
2646 deps += writePathsToFile(assets->getFullResPaths(), fp);
2648 deps += writePathsToFile(assets->getFullAssetPaths(), fp);