Home | History | Annotate | Download | only in androidfw

Lines Matching defs:ap

173     asset_path ap;
179 ap.type = ::getFileType(realPath.string());
180 if (ap.type == kFileTypeRegular) {
181 ap.path = realPath;
183 ap.path = path;
184 ap.type = ::getFileType(path.string());
185 if (ap.type != kFileTypeDirectory && ap.type != kFileTypeRegular) {
187 path.string(), (int)ap.type);
194 if (mAssetPaths[i].path == ap.path) {
203 ap.type == kFileTypeDirectory ? "dir" : "zip", ap.path.string());
205 ap.isSystemAsset = isSystemAsset;
206 mAssetPaths.add(ap);
216 for (size_t idx = 0; mZipSet.getOverlay(ap.path, idx, &oap); idx++) {
223 appendPathToResTable(ap, appAsLib);
302 asset_path ap;
303 ap.type = kFileTypeRegular;
304 ap.path = paths[i];
305 Asset* ass = openNonAssetInPathLocked("resources.arsc", Asset::ACCESS_BUFFER, ap);
307 ALOGW("failed to find resources.arsc in %s\n", ap.path.string());
595 bool AssetManager::appendPathToResTable(const asset_path& ap, bool appAsLib) const {
596 // skip those ap's that correspond to system overlays
597 if (ap.isSystemOverlay) {
605 ATRACE_NAME(ap.path.string());
606 Asset* idmap = openIdmapLocked(ap);
608 ALOGV("Looking for resource asset in '%s'\n", ap.path.string());
609 if (ap.type != kFileTypeDirectory) {
614 mZipSet.getZipResourceTable(ap.path);
622 mZipSet.getZipResourceTableAsset(ap.path);
624 ALOGV("loading resource table %s\n", ap.path.string());
628 ap);
631 mZipSet.setZipResourceTableAsset(ap.path, ass);
639 ALOGV("Creating shared resources for %s", ap.path.string());
648 addSystemOverlays(overlaysListPath.string(), ap.path, sharedRes, nextEntryIdx);
651 mZipSet.setZipResourceTable(ap.path, sharedRes);
655 ALOGV("loading resource table %s\n", ap.path.string());
659 ap);
666 ALOGV("Copying existing resources for %s", ap.path.string());
667 mResources->add(sharedRes, ap.isSystemAsset);
669 ALOGV("Parsing resources for %s", ap.path.string());
670 mResources->add(ass, idmap, nextEntryIdx + 1, !shared, appAsLib, ap.isSystemAsset);
747 Asset* AssetManager::openIdmapLocked(const struct asset_path& ap) const
750 if (ap.idmap.size() != 0) {
752 openAssetFromFileLocked(ap.idmap, Asset::ACCESS_BUFFER);
754 ALOGV("loading idmap %s\n", ap.idmap.string());
756 ALOGW("failed to load idmap %s\n", ap.idmap.string());
841 const asset_path& ap)
846 if (ap.type == kFileTypeDirectory) {
847 String8 path(ap.path);
868 ZipFileRO* pZip = getZipFileLocked(ap);
882 createZipSourceNameLocked(ZipSet::getPathName(ap.path.string()), String8(""),
898 const asset_path& ap)
906 pAsset = openInLocaleVendorLocked(fileName, mode, ap, mLocale, mVendor);
908 pAsset = openInLocaleVendorLocked(fileName, mode, ap, NULL, mVendor);
910 pAsset = openInLocaleVendorLocked(fileName, mode, ap, mLocale, NULL);
912 pAsset = openInLocaleVendorLocked(fileName, mode, ap, NULL, NULL);
927 const asset_path& ap, const char* locale, const char* vendor)
931 if (ap.type == kFileTypeDirectory) {
934 String8 path(createPathNameLocked(ap, locale, vendor));
957 String8 path(createPathNameLocked(ap, locale, vendor));
1012 if (pAsset == NULL && ap.type == kFileTypeRegular) {
1020 ZipFileRO* pZip = getZipFileLocked(ap);
1034 pAsset->setAssetSource(createZipSourceNameLocked(ZipSet::getPathName(ap.path.string()),
1061 ap, const char* locale,
1064 String8 path(ap.path);
1073 String8 AssetManager::createPathNameLocked(const asset_path& ap, const char* rootDir)
1075 String8 path(ap.path);
1093 ZipFileRO* AssetManager::getZipFileLocked(const asset_path& ap)
1097 return mZipSet.getZip(ap.path);
1218 const asset_path& ap = mAssetPaths.itemAt(i);
1219 if (ap.type == kFileTypeRegular) {
1220 ALOGV("Adding directory %s from zip %s", dirName, ap.path.string());
1221 scanAndMergeZipLocked(pMergedInfo, ap, kAssetsRoot, dirName);
1223 ALOGV("Adding directory %s from dir %s", dirName, ap.path.string());
1224 scanAndMergeDirLocked(pMergedInfo, ap, kAssetsRoot, dirName);
1272 const asset_path& ap = mAssetPaths.itemAt(which);
1273 if (ap.type == kFileTypeRegular) {
1274 ALOGV("Adding directory %s from zip %s", dirName, ap.path.string());
1275 scanAndMergeZipLocked(pMergedInfo, ap, NULL, dirName);
1277 ALOGV("Adding directory %s from dir %s", dirName, ap.path.string());
1278 scanAndMergeDirLocked(pMergedInfo, ap, NULL, dirName);
1303 const asset_path& ap, const char* rootDir, const char* dirName)
1321 path = createPathNameLocked(ap, rootDir);
1366 path = createPathNameLocked(ap, rootDir);
1491 const asset_path& ap, const char* rootDir, const char* baseDirName)
1499 pZip = mZipSet.getZip(ap.path);
1501 ALOGW("Failure opening zip %s\n", ap.path.string());
1505 zipName = ZipSet::getPathName(ap.path.string());
1757 const asset_path& ap = mAssetPaths.itemAt(i);
1758 fncScanAndMergeDirLocked(pMergedInfo, ap, NULL, NULL, dirName);
1760 fncScanAndMergeDirLocked(pMergedInfo, ap, mLocale, NULL, dirName);
1762 fncScanAndMergeDirLocked(pMergedInfo, ap, NULL, mVendor, dirName);
1764 fncScanAndMergeDirLocked(pMergedInfo, ap, mLocale, mVendor, dirName);
1776 const asset_path& ap, const char* locale, const char* vendor,
1786 partialPath = createPathNameLocked(ap, locale, vendor);
1806 fncScanAndMergeDirLocked(pMergedInfo, ap, locale, vendor, subdir.string());
1818 tmpInfo.setSourceName(createPathNameLocked(ap, locale, vendor));
1940 void AssetManager::SharedZip::addOverlay(const asset_path& ap)
1942 mOverlays.add(ap);