Definition at line 38 of file apk_asset_provider.cc.
◆ APKAssetProviderImpl()
flutter::APKAssetProviderImpl::APKAssetProviderImpl |
( |
JNIEnv * |
env, |
|
|
jobject |
jassetManager, |
|
|
std::string |
directory |
|
) |
| |
|
inlineexplicit |
Definition at line 40 of file apk_asset_provider.cc.
43 : java_asset_manager_(
env, jassetManager),
44 directory_(std::move(directory)) {
45 asset_manager_ = AAssetManager_fromJava(
env, jassetManager);
46 }
◆ ~APKAssetProviderImpl()
flutter::APKAssetProviderImpl::~APKAssetProviderImpl |
( |
| ) |
|
|
default |
◆ GetAsMapping()
std::unique_ptr< fml::Mapping > flutter::APKAssetProviderImpl::GetAsMapping |
( |
const std::string & |
asset_name | ) |
const |
|
inlineoverridevirtual |
Implements flutter::APKAssetProviderInternal.
Definition at line 50 of file apk_asset_provider.cc.
51 {
52 std::stringstream ss;
53 ss << directory_.c_str() << "/" << asset_name;
54 AAsset* asset = AAssetManager_open(asset_manager_, ss.str().c_str(),
55 AASSET_MODE_BUFFER);
56 if (!asset) {
57 return nullptr;
58 }
59
60 return std::make_unique<APKAssetMapping>(asset);
61 };
The documentation for this class was generated from the following file: