Home
last modified time | relevance | path

Searched refs:asset (Results 1 – 25 of 52) sorted by relevance

123

/frameworks/base/native/android/
Dasset_manager.cpp51 explicit AAsset(Asset* asset) : mAsset(asset) { } in AAsset()
108 Asset* asset = mgr->open(filename, amMode); in AAssetManager_open() local
109 if (asset == NULL) { in AAssetManager_open()
113 return new AAsset(asset); in AAssetManager_open()
171 int AAsset_read(AAsset* asset, void* buf, size_t count) in AAsset_read() argument
173 return asset->mAsset->read(buf, (size_t)count); in AAsset_read()
176 off_t AAsset_seek(AAsset* asset, off_t offset, int whence) in AAsset_seek() argument
178 return asset->mAsset->seek(offset, whence); in AAsset_seek()
181 off64_t AAsset_seek64(AAsset* asset, off64_t offset, int whence) in AAsset_seek64() argument
183 return asset->mAsset->seek(offset, whence); in AAsset_seek64()
[all …]
/frameworks/native/include/android/
Dasset_manager.h131 int AAsset_read(AAsset* asset, void* buf, size_t count);
139 off_t AAsset_seek(AAsset* asset, off_t offset, int whence)
151 off64_t AAsset_seek64(AAsset* asset, off64_t offset, int whence);
156 void AAsset_close(AAsset* asset);
163 const void* AAsset_getBuffer(AAsset* asset);
168 off_t AAsset_getLength(AAsset* asset)
175 off64_t AAsset_getLength64(AAsset* asset);
180 off_t AAsset_getRemainingLength(AAsset* asset)
188 off64_t AAsset_getRemainingLength64(AAsset* asset);
198 int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength)
[all …]
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
DDirectStatementRetriever.java131 private String computeAssociationJsonUrl(WebAsset asset) { in computeAssociationJsonUrl() argument
133 return new URL(asset.getScheme(), asset.getDomain(), asset.getPort(), in computeAssociationJsonUrl()
178 private Result retrieveFromWeb(WebAsset asset) in retrieveFromWeb() argument
180 return retrieveStatementFromUrl(computeAssociationJsonUrl(asset), MAX_INCLUDE_LEVEL, asset); in retrieveFromWeb()
183 private Result retrieveFromAndroid(AndroidAppAsset asset) throws AssociationServiceException { in retrieveFromAndroid() argument
188 List<String> certFps = mAndroidFetcher.getCertFingerprints(asset.getPackageName()); in retrieveFromAndroid()
189 if (!Utils.hasCommonString(certFps, asset.getCertFingerprints())) { in retrieveFromAndroid()
194 AndroidAppAsset actualSource = AndroidAppAsset.create(asset.getPackageName(), certFps); in retrieveFromAndroid()
195 for (String statementJson : mAndroidFetcher.getStatements(asset.getPackageName())) { in retrieveFromAndroid()
DWebAsset.java84 StringBuilder asset = new StringBuilder(); in toString() local
85 asset.append("WebAsset: "); in toString()
86 asset.append(toJson()); in toString()
87 return asset.toString(); in toString()
120 protected static WebAsset create(JSONObject asset) in create() argument
122 if (asset.optString(Utils.WEB_ASSET_FIELD_SITE).equals("")) { in create()
129 url = new URL(asset.optString(Utils.WEB_ASSET_FIELD_SITE)); in create()
DAssetFactory.java35 public static AbstractAsset create(JSONObject asset) in create() argument
37 String namespace = asset.optString(Utils.NAMESPACE_FIELD, null); in create()
44 return WebAsset.create(asset); in create()
46 return AndroidAppAsset.create(asset); in create()
DAndroidAppAsset.java77 StringBuilder asset = new StringBuilder(); in toString() local
78 asset.append("AndroidAppAsset: "); in toString()
79 asset.append(toJson()); in toString()
80 return asset.toString(); in toString()
115 public static AndroidAppAsset create(JSONObject asset) in create() argument
117 String packageName = asset.optString(Utils.ANDROID_APP_ASSET_FIELD_PACKAGE_NAME); in create()
123 JSONArray certArray = asset.optJSONArray(Utils.ANDROID_APP_ASSET_FIELD_CERT_FPS); in create()
DWebAssetMatcher.java31 public boolean matches(AbstractAsset asset) { in matches() argument
32 if (asset instanceof WebAsset) { in matches()
33 WebAsset webAsset = (WebAsset) asset; in matches()
DAndroidAppAssetMatcher.java35 public boolean matches(AbstractAsset asset) { in matches() argument
36 if (asset instanceof AndroidAppAsset) { in matches()
37 AndroidAppAsset androidAppAsset = (AndroidAppAsset) asset; in matches()
/frameworks/base/core/jni/android/graphics/
DUtils.cpp23 AssetStreamAdaptor::AssetStreamAdaptor(Asset* asset) in AssetStreamAdaptor() argument
24 : fAsset(asset) in AssetStreamAdaptor()
83 SkMemoryStream* android::CopyAssetToStream(Asset* asset) { in CopyAssetToStream() argument
84 if (NULL == asset) { in CopyAssetToStream()
88 const off64_t seekReturnVal = asset->seek(0, SEEK_SET); in CopyAssetToStream()
94 const off64_t size = asset->getLength(); in CopyAssetToStream()
101 const off64_t len = asset->read(data->writable_data(), size); in CopyAssetToStream()
DFontFamily.cpp237 Asset* asset; in FontFamily_addFontFromAssetManager() local
239 asset = mgr->open(str.c_str(), Asset::ACCESS_BUFFER); in FontFamily_addFontFromAssetManager()
241 asset = cookie ? mgr->openNonAsset(static_cast<int32_t>(cookie), str.c_str(), in FontFamily_addFontFromAssetManager()
245 if (NULL == asset) { in FontFamily_addFontFromAssetManager()
250 const void* buf = asset->getBuffer(false); in FontFamily_addFontFromAssetManager()
252 delete asset; in FontFamily_addFontFromAssetManager()
257 sk_sp<SkData> data(SkData::MakeWithProc(buf, asset->getLength(), releaseAsset, asset)); in FontFamily_addFontFromAssetManager()
/frameworks/av/drm/mediacas/plugins/clearkey/
Decm_generator.cpp59 status_t DecodeECM(const sp<ABuffer>& ecm, Asset* asset, in DecodeECM() argument
61 CHECK(asset); in DecodeECM()
65 status_t status = DecodeECMClearFields(ecm, asset, default_fields); in DecodeECM()
77 status_t DecodeECMClearFields(const sp<ABuffer>& ecm, Asset* asset, in DecodeECMClearFields() argument
79 CHECK(asset); in DecodeECMClearFields()
98 asset->set_id(LoadNext32(&ptr)); in DecodeECMClearFields()
99 if (asset->id() == 0) { in DecodeECMClearFields()
Decm.cpp46 Asset asset; in Parse() local
49 buffer_as_binary, &asset, &default_fields); in Parse()
54 set_asset_id(asset.id()); in Parse()
69 Asset asset(asset_from_emm); in Decrypt() local
73 buffer_as_binary, &asset, &content_key, &default_fields); in Decrypt()
78 if (asset.id() != asset_from_emm.id()) { in Decrypt()
80 asset_from_emm.id(), asset.id()); in Decrypt()
83 set_asset_id(asset.id()); in Decrypt()
DJsonAssetLoader.cpp55 const String8& jsonAssetString, Asset *asset) { in extractAssetFromString() argument
67 if (!findKey(mJsonObjects[0], asset)) { in extractAssetFromString()
88 bool JsonAssetLoader::findKey(const String8& jsonObject, Asset *asset) { in findKey() argument
97 asset->set_id(atoi(value.string())); in findKey()
104 asset->set_name(value.string()); in findKey()
111 asset->set_lowercase_organization_name(value.string()); in findKey()
119 asset->set_cas_type((Asset_CasType)atoi(value.string())); in findKey()
DClearKeyLicenseFetcher.cpp36 uint64_t /* asset_id */, Asset* asset) { in FetchLicense() argument
37 *asset = asset_; in FetchLicense()
Decm_generator.h81 status_t DecodeECM(const sp<ABuffer>& ecm, Asset* asset,
105 status_t DecodeECMClearFields(const sp<ABuffer>& ecm, Asset* asset,
DJsonAssetLoader.h38 const String8& jsonAssetString, Asset *asset);
47 bool findKey(const String8& jsonObject, Asset *asset);
/frameworks/base/libs/androidfw/
DAsset.cpp56 void Asset::registerAsset(Asset* asset) in registerAsset() argument
60 asset->mNext = asset->mPrev = NULL; in registerAsset()
62 gHead = gTail = asset; in registerAsset()
64 asset->mPrev = gTail; in registerAsset()
65 gTail->mNext = asset; in registerAsset()
66 gTail = asset; in registerAsset()
70 ALOGI("Creating Asset %p #%d\n", asset, gCount); in registerAsset()
74 void Asset::unregisterAsset(Asset* asset) in unregisterAsset() argument
78 if (gHead == asset) { in unregisterAsset()
79 gHead = asset->mNext; in unregisterAsset()
[all …]
DApkAssets.cpp106 std::unique_ptr<Asset> asset = in Open() local
108 if (asset == nullptr) { in Open()
112 return asset; in Open()
121 std::unique_ptr<Asset> asset = Asset::createFromUncompressedMap(std::move(map), mode); in Open() local
122 if (asset == nullptr) { in Open()
126 return asset; in Open()
/frameworks/base/libs/androidfw/tests/
DAsset_test.cpp25 Asset* asset = new _FileAsset(); in TEST() local
27 delete asset; in TEST()
33 Asset* asset = new _CompressedAsset(); in TEST() local
35 delete asset; in TEST()
DApkAssets_test.cpp35 std::unique_ptr<Asset> asset = loaded_apk->Open("res/layout/main.xml"); in TEST() local
36 ASSERT_NE(nullptr, asset); in TEST()
78 auto asset = loaded_apk->Open("assets/uncompressed.txt", Asset::ACCESS_UNKNOWN); in TEST() local
79 ASSERT_NE(nullptr, asset); in TEST()
82 base::unique_fd fd(asset->openFileDescriptor(&start, &length)); in TEST()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/
DSetupWizardLayout.java246 public void setIllustration(int asset, int horizontalTile) { in setIllustration() argument
250 final Drawable illustrationDrawable = getIllustration(asset, horizontalTile); in setIllustration()
255 private void setIllustration(Drawable asset, Drawable horizontalTile) { in setIllustration() argument
259 final Drawable illustrationDrawable = getIllustration(asset, horizontalTile); in setIllustration()
326 private Drawable getIllustration(int asset, int horizontalTile) { in getIllustration() argument
328 final Drawable assetDrawable = context.getResources().getDrawable(asset); in getIllustration()
334 private Drawable getIllustration(Drawable asset, Drawable horizontalTile) { in getIllustration() argument
342 if (asset instanceof BitmapDrawable) { in getIllustration()
344 ((BitmapDrawable) asset).setGravity(Gravity.TOP | Gravity.LEFT); in getIllustration()
347 new LayerDrawable(new Drawable[] { horizontalTile, asset }); in getIllustration()
[all …]
/frameworks/base/core/java/android/content/res/
DAssetManager.java374 long asset = openAsset(fileName, accessMode); in open() local
375 if (asset != 0) { in open()
376 AssetInputStream res = new AssetInputStream(asset); in open()
466 long asset = openNonAssetNative(cookie, fileName, accessMode); in openNonAsset() local
467 if (asset != 0) { in openNonAsset()
468 AssetInputStream res = new AssetInputStream(asset); in openNonAsset()
616 private AssetInputStream(long asset) in AssetInputStream() argument
618 mAsset = asset; in AssetInputStream()
619 mLength = getAssetLength(asset); in AssetInputStream()
813 private native final void destroyAsset(long asset); in destroyAsset() argument
[all …]
/frameworks/av/drm/mediacas/plugins/clearkey/protos/
Dlicense_protos.proto24 // customer's video asset.
40 // Organization-specified name of the asset. Required. Must not be empty.
49 optional string policy_name = 4; // Name of the Policy to apply to this asset.
59 // asset keys per asset. This is not supported in this implementation.
61 optional bytes encryption_key = 1; // 256-byte key for the asset.
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/
DTestAssetRepository.java32 File asset = new File(path); in open() local
33 if (asset.isFile()) { in open()
34 return new FileInputStream(asset); in open()
/frameworks/base/graphics/java/android/graphics/
DMovie.java56 final long asset = ((AssetManager.AssetInputStream) is).getNativeAsset(); in decodeStream() local
57 return nativeDecodeAsset(asset); in decodeStream()
63 private static native Movie nativeDecodeAsset(long asset); in nativeDecodeAsset() argument

123