Searched refs:asset (Results 1 - 25 of 57) sorted by relevance

123

/frameworks/base/libs/androidfw/tests/
H A DAsset_test.cpp25 Asset* asset = new _FileAsset(); local
27 delete asset;
33 Asset* asset = new _CompressedAsset(); local
35 delete asset;
H A DAttributeResolution_bench.cpp49 std::unique_ptr<Asset> asset = local
51 if (asset == nullptr) {
57 if (xml_tree.setTo(asset->getBuffer(true), asset->getLength(), false /*copyData*/) != NO_ERROR) {
130 std::unique_ptr<Asset> asset = assetmanager.OpenNonAsset( local
132 if (asset == nullptr) {
138 if (xml_tree.setTo(asset->getBuffer(true), asset->getLength(), false /*copyData*/) != NO_ERROR) {
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
H A DWebAssetMatcher.java31 public boolean matches(AbstractAsset asset) { argument
32 if (asset instanceof WebAsset) {
33 WebAsset webAsset = (WebAsset) asset;
H A DAssetFactory.java22 * Factory to create asset from JSON string.
31 * Checks that the input is a valid asset with purposes.
33 * @throws AssociationServiceException if the asset is not well formatted.
35 public static AbstractAsset create(JSONObject asset) argument
37 String namespace = asset.optString(Utils.NAMESPACE_FIELD, null);
44 return WebAsset.create(asset);
46 return AndroidAppAsset.create(asset);
H A DAndroidAppAssetMatcher.java35 public boolean matches(AbstractAsset asset) { argument
36 if (asset instanceof AndroidAppAsset) {
37 AndroidAppAsset androidAppAsset = (AndroidAppAsset) asset;
H A DAbstractAssetMatcher.java22 * An asset matcher that can match asset with the given query.
27 * Returns true if this AssetMatcher matches the asset.
29 public abstract boolean matches(AbstractAsset asset); argument
H A DWebAsset.java26 * Immutable value type that names a web asset.
28 * <p>A web asset can be named by its protocol, domain, and port using this JSON string:
84 StringBuilder asset = new StringBuilder();
85 asset.append("WebAsset: ");
86 asset.append(toJson());
87 return asset.toString();
111 // Only allow insecure include file if the asset scheme is http.
116 * Checks that the input is a valid web asset.
118 * @throws AssociationServiceException if the asset is not well formatted.
120 protected static WebAsset create(JSONObject asset) argument
[all...]
H A DDirectStatementRetriever.java33 * the asset.
131 private String computeAssociationJsonUrl(WebAsset asset) { argument
133 return new URL(asset.getScheme(), asset.getDomain(), asset.getPort(),
178 private Result retrieveFromWeb(WebAsset asset) argument
180 return retrieveStatementFromUrl(computeAssociationJsonUrl(asset), MAX_INCLUDE_LEVEL, asset);
183 private Result retrieveFromAndroid(AndroidAppAsset asset) throws AssociationServiceException { argument
188 List<String> certFps = mAndroidFetcher.getCertFingerprints(asset
[all...]
H A DAndroidAppAsset.java30 * Immutable value type that names an Android app asset.
77 StringBuilder asset = new StringBuilder();
78 asset.append("AndroidAppAsset: ");
79 asset.append(toJson());
80 return asset.toString();
109 * Checks that the input is a valid Android app asset.
111 * @param asset a JSONObject that has "namespace", "package_name", and
113 * @throws AssociationServiceException if the asset is not well formatted.
115 public static AndroidAppAsset create(JSONObject asset) argument
117 String packageName = asset
[all...]
/frameworks/native/include/android/
H A Dasset_manager.h49 * The asset hierarchy may be examined like a filesystem, using
58 * {@link AAssetDir} provides access to a chunk of the asset hierarchy as if
68 * {@link AAsset} provides access to a read-only asset.
89 * Open the named directory within the asset hierarchy. The directory can then
98 * Open an asset.
105 * Iterate over the files in an asset directory. A NULL string is returned
131 int AAsset_read(AAsset* asset, void* buf, size_t count);
134 * Seek to the specified offset within the asset data. 'whence' uses the
139 off_t AAsset_seek(AAsset* asset, off_t offset, int whence)
143 * Seek to the specified offset within the asset dat
[all...]
/frameworks/base/native/android/
H A Dasset_manager.cpp53 explicit AAsset(std::unique_ptr<Asset> asset) : mAsset(std::move(asset)) { } argument
87 std::unique_ptr<Asset> asset = locked_mgr->Open(filename, amMode); local
88 if (asset == nullptr) {
91 return new AAsset(std::move(asset));
149 int AAsset_read(AAsset* asset, void* buf, size_t count) argument
151 return asset->mAsset->read(buf, (size_t)count);
154 off_t AAsset_seek(AAsset* asset, off_t offset, int whence) argument
156 return asset->mAsset->seek(offset, whence);
159 off64_t AAsset_seek64(AAsset* asset, off64_ argument
164 AAsset_close(AAsset* asset) argument
170 AAsset_getBuffer(AAsset* asset) argument
175 AAsset_getLength(AAsset* asset) argument
180 AAsset_getLength64(AAsset* asset) argument
185 AAsset_getRemainingLength(AAsset* asset) argument
190 AAsset_getRemainingLength64(AAsset* asset) argument
195 AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength) argument
206 AAsset_openFileDescriptor64(AAsset* asset, off64_t* outStart, off64_t* outLength) argument
211 AAsset_isAllocated(AAsset* asset) argument
[all...]
/frameworks/av/drm/mediacas/plugins/clearkey/
H A DClearKeyLicenseFetcher.cpp36 uint64_t /* asset_id */, Asset* asset) {
37 *asset = asset_;
35 FetchLicense( uint64_t , Asset* asset) argument
H A Decm_generator.cpp57 status_t DecodeECM(const sp<ABuffer>& ecm, Asset* asset, argument
59 CHECK(asset);
63 status_t status = DecodeECMClearFields(ecm, asset, default_fields);
75 status_t DecodeECMClearFields(const sp<ABuffer>& ecm, Asset* asset, argument
77 CHECK(asset);
96 asset->set_id(LoadNext32(&ptr));
97 if (asset->id() == 0) {
H A DClearKeyLicenseFetcher.h33 virtual status_t FetchLicense(uint64_t asset_id, Asset* asset);
H A DLicenseFetcher.h36 // Fetches license based on |asset_id|. On return, |asset| contains the
38 // |asset| must be non-null.
40 uint64_t asset_id, clearkeycas::Asset* asset) = 0;
H A DJsonAssetLoader.h38 const String8& jsonAssetString, Asset *asset);
47 bool findKey(const String8& jsonObject, Asset *asset);
H A Decm.cpp46 Asset asset; local
49 buffer_as_binary, &asset, &default_fields);
54 set_asset_id(asset.id());
65 // Invariant: asset has id. These are postconditions for Emm::Decrypt().
68 // DecodeEcm fills in |asset|.id() with the asset_id from the encoded Ecm.
69 Asset asset(asset_from_emm);
73 buffer_as_binary, &asset, &content_key, &default_fields);
78 if (asset.id() != asset_from_emm.id()) {
80 asset_from_emm.id(), asset.id());
83 set_asset_id(asset
[all...]
H A Decm_generator.h50 // The clear asset ID (bytes 12-15) is compared to the encrypted asset ID
62 // asset->id
71 // |asset|, |content_key|, |default_fields| are owned by caller and must not
76 // Asset asset;
80 // status_t status = ecm_generator::DecodeECM(ecm, &asset, &content_key, &default_fields);
81 status_t DecodeECM(const sp<ABuffer>& ecm, Asset* asset,
85 // asset->id
91 // offset, asset and default_fields are owned by caller and must not be NULL.
101 // Asset asset;
[all...]
H A DJsonAssetLoader.cpp46 * Extract a clear key asset from a JSON string.
48 * Returns OK if a clear key asset is extracted successfully,
50 * clear key asset.
53 const String8& jsonAssetString, Asset *asset) {
65 if (!findKey(mJsonObjects[0], asset)) {
86 bool JsonAssetLoader::findKey(const String8& jsonObject, Asset *asset) { argument
95 asset->set_id(atoi(value.string()));
102 asset->set_name(value.string());
109 asset->set_lowercase_organization_name(value.string());
117 asset
52 extractAssetFromString( const String8& jsonAssetString, Asset *asset) argument
[all...]
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/
H A DTestAssetRepository.java40 File asset = new File(path);
41 if (asset.isFile()) {
42 return new FileInputStream(asset);
/frameworks/base/core/jni/android/graphics/
H A DUtils.cpp23 AssetStreamAdaptor::AssetStreamAdaptor(Asset* asset) argument
24 : fAsset(asset)
91 // asset->seek returns new total offset
115 SkMemoryStream* android::CopyAssetToStream(Asset* asset) { argument
116 if (NULL == asset) {
120 const off64_t seekReturnVal = asset->seek(0, SEEK_SET);
122 SkDebugf("---- copyAsset: asset rewind failed\n");
126 const off64_t size = asset->getLength();
128 SkDebugf("---- copyAsset: asset->getLength() returned %d\n", size);
133 const off64_t len = asset
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DMovie.java60 final long asset = ((AssetManager.AssetInputStream) is).getNativeAsset();
61 return nativeDecodeAsset(asset);
67 private static native Movie nativeDecodeAsset(long asset); argument
/frameworks/base/libs/androidfw/
H A DAsset.cpp18 // Provide access to a read-only asset.
21 #define LOG_TAG "asset"
56 void Asset::registerAsset(Asset* asset) argument
60 asset->mNext = asset->mPrev = NULL;
62 gHead = gTail = asset;
64 asset->mPrev = gTail;
65 gTail->mNext = asset;
66 gTail = asset;
70 ALOGI("Creating Asset %p #%d\n", asset, gCoun
74 unregisterAsset(Asset* asset) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_content_res_ApkAssets.cpp53 std::string error_msg = base::StringPrintf("Failed to load asset path %s", path.c_str());
85 std::string error_msg = base::StringPrintf("Failed to load asset path %s from fd %d",
120 std::unique_ptr<Asset> asset = apk_assets->Open(path_utf8.c_str(), local
122 if (asset == nullptr) {
130 status_t err = xml_tree->setTo(asset->getBuffer(true), asset->getLength(), true);
131 asset.reset();
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/
H A DSetupWizardLayout.java224 * a suitable drawable from an asset and a horizontal repeating tile, use
238 * Set the illustration of the layout, which will be created asset and the horizontal tile as
239 * suitable. On phone layouts (not sw600dp), the asset will be scaled, maintaining aspect ratio.
241 * illustration area that the asset doesn't fill will be covered by the horizontalTile.
243 * @param asset Resource ID of the illustration asset.
246 public void setIllustration(int asset, int horizontalTile) { argument
250 final Drawable illustrationDrawable = getIllustration(asset, horizontalTile);
255 private void setIllustration(Drawable asset, Drawable horizontalTile) { argument
259 final Drawable illustrationDrawable = getIllustration(asset, horizontalTil
326 getIllustration(int asset, int horizontalTile) argument
334 getIllustration(Drawable asset, Drawable horizontalTile) argument
[all...]

Completed in 509 milliseconds

123