Home | History | Annotate | Download | only in androidfw

Lines Matching refs:Asset

21 #define LOG_TAG "asset"
25 #include <androidfw/Asset.h>
82 static Asset* const kExcludedAsset = (Asset*) 0xd000000d;
185 ALOGW("Asset path %s is neither a directory nor file (type=%d).",
201 ALOGV("In %p Asset %s path: %s", this,
332 Asset* ass = openNonAssetInPathLocked("resources.arsc", Asset::ACCESS_BUFFER, ap);
489 * Open an asset.
512 Asset* AssetManager::open(const char* fileName, AccessMode mode)
526 * For each top-level asset path, search for the asset.
532 ALOGV("Looking for asset '%s' in '%s'\n",
534 Asset* pAsset = openNonAssetInPathLocked(assetName.string(), mode, mAssetPaths.itemAt(i));
544 * Open a non-asset file as if it were an asset.
549 Asset* AssetManager::openNonAsset(const char* fileName, AccessMode mode)
560 * For each top-level asset path, search for the asset.
566 ALOGV("Looking for non-asset '%s' in '%s'\n", fileName, mAssetPaths.itemAt(i).path.string());
567 Asset* pAsset = openNonAssetInPathLocked(
577 Asset* AssetManager::openNonAsset(void* cookie, const char* fileName, AccessMode mode)
590 ALOGV("Looking for non-asset '%s' in '%s'\n", fileName,
592 Asset* pAsset = openNonAssetInPathLocked(
603 * Get the type of a file in the asset namespace.
610 Asset* pAsset = NULL;
613 * Open the asset. This is less efficient than simply finding the
617 pAsset = open(fileName, Asset::ACCESS_STREAMING);
633 // Iterate through all asset packages, collecting resources from each.
650 Asset* ass = NULL;
655 Asset* idmap = openIdmapLocked(ap);
656 ALOGV("Looking for resource asset in '%s'\n", ap.path.string());
671 Asset::ACCESS_BUFFER,
680 // If this is the first resource table in the asset
692 Asset* ass = const_cast<AssetManager*>(this)->
694 Asset::ACCESS_BUFFER,
703 ALOGV("Installing resource asset %p in to table %p\n", ass, mResources);
754 Asset* AssetManager::openIdmapLocked(const struct asset_path& ap) const
756 Asset* ass = NULL;
759 openAssetFromFileLocked(ap.idmap, Asset::ACCESS_BUFFER);
790 * Open a non-asset file as if it were an asset, searching for it in the
796 Asset* AssetManager::openNonAssetInPathLocked(const char* fileName, AccessMode mode,
799 Asset* pAsset = NULL;
849 * Open an asset, searching for it in the directory hierarchy for the
855 Asset* AssetManager::openInPathLocked(const char* fileName, AccessMode mode,
858 Asset* pAsset = NULL;
876 * Open an asset, searching for it in the directory hierarchy for the
884 Asset* AssetManager::openInLocaleVendorLocked(const char* fileName, AccessMode mode,
887 Asset* pAsset = NULL;
950 * we want to return the loose asset. If the cached file gets
1019 * Create a path to a loose asset (asset-base/app/locale/vendor).
1031 * Create a path to a loose asset (asset-base/app/rootDir).
1061 * Try to open an asset from a file on disk.
1067 * around. If so, we want to hand that to the Asset instead.
1072 Asset* AssetManager::openAssetFromFileLocked(const String8& pathName,
1075 Asset* pAsset = NULL;
1079 pAsset = Asset::createFromCompressedFile(pathName.string(), mode);
1082 pAsset = Asset::createFromFile(pathName.string(), mode);
1089 * Given an entry in a Zip archive, create a new Asset object.
1094 Asset* AssetManager::openAssetFromZipLocked(const ZipFileRO* pZipFile,
1097 Asset* pAsset = NULL;
1121 pAsset = Asset::createFromUncompressedMap(dataMap, mode);
1125 pAsset = Asset::createFromCompressedMap(dataMap, method,
1141 * Open a directory in the asset namespace.
1143 * An "asset directory" is simply the combination of all files in all
1204 * Open a directory in the non-asset namespace.
1206 * An "asset directory" is simply the combination of all files in all
1741 // asset path separately from its filename.
1845 Asset* AssetManager::SharedZip::getResourceTableAsset()
1847 ALOGV("Getting from SharedZip %p resource asset %p\n", this, mResourceTableAsset);
1851 Asset* AssetManager::SharedZip::setResourceTableAsset(Asset* asset)
1856 mResourceTableAsset = asset;
1859 asset->getBuffer(true);
1860 return asset;
1863 delete asset;
1953 Asset* AssetManager::ZipSet::getZipResourceTableAsset(const String8& path)
1964 Asset* AssetManager::ZipSet::setZipResourceTableAsset(const String8& path,
1965 Asset* asset)
1970 return zip->setResourceTableAsset(asset);
1995 * gets to prepend the asset root directory.