Lines Matching refs:bundle

220 static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets,  in parsePackage()  argument
267bundle->setRevisionCode(String8(block.getAttributeStringValue(revisionCodeIndex, &len)).string()); in parsePackage()
280 bundle->setManifestMinSdkVersion(minSdk8); in parsePackage()
293 static status_t makeFileResources(Bundle* bundle, const sp<AaptAssets>& assets, in makeFileResources() argument
306 if (bundle->getVerbose()) { 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
369 if (bundle->getUseCrunchCache() == false) { in preProcessImages()
374 bundle, assets, it.getFile(), &hasErrors); in preProcessImages()
593 static bool applyFileOverlay(Bundle *bundle, in applyFileOverlay() argument
598 if (bundle->getVerbose()) { in applyFileOverlay()
620 if (bundle->getVerbose()) { in applyFileOverlay()
636 if (bundle->getVerbose()) { in applyFileOverlay()
657 if (bundle->getVerbose()) { in applyFileOverlay()
666 if (true || bundle->getVerbose()) { in applyFileOverlay()
857 status_t massageManifest(Bundle* bundle, ResourceTable* table, sp<XMLNode> root) in massageManifest() argument
865 bool errorOnFailedInsert = bundle->getErrorOnFailedInsert(); in massageManifest()
866 bool replaceVersion = bundle->getReplaceVersion(); in massageManifest()
869 bundle->getVersionCode(), errorOnFailedInsert, replaceVersion)) { in massageManifest()
875 bundle->setVersionCode(strdup(String8(attr->string).string())); in massageManifest()
880 bundle->getVersionName(), errorOnFailedInsert, replaceVersion)) { in massageManifest()
886 bundle->setVersionName(strdup(String8(attr->string).string())); in massageManifest()
891 if (bundle->getMinSdkVersion() != NULL in massageManifest()
892 || bundle->getTargetSdkVersion() != NULL in massageManifest()
893 || bundle->getMaxSdkVersion() != NULL) { in massageManifest()
900 bundle->getMinSdkVersion(), errorOnFailedInsert)) { in massageManifest()
904 bundle->getTargetSdkVersion(), errorOnFailedInsert)) { in massageManifest()
908 bundle->getMaxSdkVersion(), errorOnFailedInsert)) { in massageManifest()
917 bundle->setMinSdkVersion(strdup(String8(attr->string).string())); in massageManifest()
922 if (bundle->getCompileSdkVersion() != 0) { in massageManifest()
924 String8::format("%d", bundle->getCompileSdkVersion()), in massageManifest()
930 if (bundle->getCompileSdkVersionCodename() != "") { in massageManifest()
932 bundle->getCompileSdkVersionCodename(), errorOnFailedInsert, true)) { in massageManifest()
937 if (bundle->getPlatformBuildVersionCode() != "") { in massageManifest()
939 bundle->getPlatformBuildVersionCode(), errorOnFailedInsert, true)) { in massageManifest()
944 if (bundle->getPlatformBuildVersionName() != "") { in massageManifest()
946 bundle->getPlatformBuildVersionName(), errorOnFailedInsert, true)) { in massageManifest()
951 if (bundle->getDebugMode()) { in massageManifest()
962 const char* manifestPackageNameOverride = bundle->getManifestPackageNameOverride(); in massageManifest()
998 … const char* instrumentationPackageNameOverride = bundle->getInstrumentationPackageNameOverride(); in massageManifest()
1071 static ssize_t extractPlatformBuildVersion(const ResTable& table, ResXMLTree& tree, Bundle* bundle)… in extractPlatformBuildVersion() argument
1102 if (versionCode >= 0 && bundle->getPlatformBuildVersionCode() == "") { in extractPlatformBuildVersion()
1103 bundle->setPlatformBuildVersionCode(String8::format("%d", versionCode)); in extractPlatformBuildVersion()
1106 if (useCompileSdkVersion && versionCode >= 0 && bundle->getCompileSdkVersion() == 0) { in extractPlatformBuildVersion()
1107 bundle->setCompileSdkVersion(versionCode); in extractPlatformBuildVersion()
1116 if (versionName != "" && bundle->getPlatformBuildVersionName() == "") { in extractPlatformBuildVersion()
1117 bundle->setPlatformBuildVersionName(versionName); in extractPlatformBuildVersion()
1121 && bundle->getCompileSdkVersionCodename() == "") { in extractPlatformBuildVersion()
1122 bundle->setCompileSdkVersionCodename(versionName); in extractPlatformBuildVersion()
1131 static ssize_t extractPlatformBuildVersion(AssetManager& assets, Bundle* bundle) { in extractPlatformBuildVersion() argument
1154 result = extractPlatformBuildVersion(assets.getResources(true), tree, bundle); in extractPlatformBuildVersion()
1170 status_t updatePreProcessedCache(Bundle* bundle) in updatePreProcessedCache() argument
1177 String8 source(bundle->getResourceSourceDirs()[0]); in updatePreProcessedCache()
1178 String8 dest(bundle->getCrunchedOutputDir()); in updatePreProcessedCache()
1183 CacheUpdater* cu = new SystemCacheUpdater(bundle); in updatePreProcessedCache()
1186 if (bundle->getVerbose()) in updatePreProcessedCache()
1199 status_t generateAndroidManifestForSplit(Bundle* bundle, const sp<AaptAssets>& assets, in generateAndroidManifestForSplit() argument
1211 const char* manifestPackageNameOverride = bundle->getManifestPackageNameOverride(); in generateAndroidManifestForSplit()
1219 bundle->getVersionCode(), true, true)) { in generateAndroidManifestForSplit()
1224 if (bundle->getRevisionCode().size() > 0) { in generateAndroidManifestForSplit()
1226 bundle->getRevisionCode().string(), true, true)) { 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
1267 status_t err = parsePackage(bundle, assets, androidManifestFile); in buildResources()
1278 if (bundle->getPrivateSymbolsPackage().size() != 0) { in buildResources()
1279 assets->setSymbolsPrivatePackage(bundle->getPrivateSymbolsPackage()); in buildResources()
1283 if (bundle->getBuildSharedLibrary()) { in buildResources()
1285 } else if (bundle->getExtending()) { in buildResources()
1287 } else if (!bundle->getFeatureOfPackage().isEmpty()) { in buildResources()
1291 ResourceTable table(bundle, String16(assets->getPackage()), packageType); in buildResources()
1292 err = table.addIncludedResources(bundle, assets); in buildResources()
1308 if (!bundle->getUTF16StringsOption()) { 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()
1376 if (bundle->getOutputAPKFile() != NULL) { in buildResources()
1377 err = preProcessImages(bundle, assets, drawables, "drawable"); in buildResources()
1380 err = makeFileResources(bundle, assets, &table, drawables, "drawable"); in buildResources()
1390 if (bundle->getOutputAPKFile() != NULL) { 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()
1471 res = compileResourceFile(bundle, assets, file, it.getParams(), 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()
1739 (bundle->getPlatformBuildVersionCode() == "" || in buildResources()
1740 bundle->getPlatformBuildVersionName() == "" || in buildResources()
1741 bundle->getCompileSdkVersion() == 0 || in buildResources()
1742 bundle->getCompileSdkVersionCodename() == "")) { in buildResources()
1743 err = extractPlatformBuildVersion(assets->getAssetManager(), bundle); in buildResources()
1758 err = massageManifest(bundle, &table, manifestTree); in buildResources()
1762 err = compileXmlFile(bundle, assets, String16(), manifestTree, manifestFile, &table); in buildResources()
1767 if (table.modifyForCompat(bundle) != NO_ERROR) { in buildResources()
1785 err = table.addSymbols(symbols, bundle->getSkipSymbolsWithoutDefaultLocalization()); in buildResources()
1803 err = table.flatten(bundle, split->getResourceFilter(), in buildResources()
1854 if (bundle->getVerbose()) { in buildResources()
1879 err = generateAndroidManifestForSplit(bundle, assets, split, in buildResources()
1890 if (bundle->getPublicOutputFile()) { in buildResources()
1891 FILE* fp = fopen(bundle->getPublicOutputFile(), "w+"); in buildResources()
1894 (const char*)bundle->getPublicOutputFile(), strerror(errno)); in buildResources()
1897 if (bundle->getVerbose()) { in buildResources()
1898 printf(" Writing public definitions to %s.\n", bundle->getPublicOutputFile()); in buildResources()
1917 err = compileXmlFile(bundle, assets, String16(), manifestFile, in buildResources()
2829 status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets, in writeResourceSymbols() argument
2832 if (!bundle->getRClassDir()) { in writeResourceSymbols()
2836 const char* textSymbolsDest = bundle->getOutputTextSymbols(); in writeResourceSymbols()
2843 String8 dest(bundle->getRClassDir()); in writeResourceSymbols()
2845 if (bundle->getMakePackageDirs()) { in writeResourceSymbols()
2871 if (bundle->getVerbose()) { in writeResourceSymbols()
2886 className, 0, bundle->getNonConstantId(), emitCallback); in writeResourceSymbols()
2903 if (bundle->getVerbose()) { in writeResourceSymbols()
2917 if (bundle->getGenDependencies() && R == className) { in writeResourceSymbols()
2919 String8 dependencyFile(bundle->getRClassDir()); in writeResourceSymbols()
3320 writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets) in writeProguardFile() argument
3324 if (!bundle->getProguardFile()) { in writeProguardFile()
3340 return writeProguardSpec(bundle->getProguardFile(), keep, err); in writeProguardFile()
3344 writeMainDexProguardFile(Bundle* bundle, const sp<AaptAssets>& assets) in writeMainDexProguardFile() argument
3348 if (!bundle->getMainDexProguardFile()) { in writeMainDexProguardFile()
3359 return writeProguardSpec(bundle->getMainDexProguardFile(), keep, err); in writeMainDexProguardFile()