5#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_APK_ASSET_PROVIDER_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_APK_ASSET_PROVIDER_H_
8#include <android/asset_manager_jni.h>
11#include "flutter/assets/asset_resolver.h"
12#include "flutter/fml/memory/ref_counted.h"
13#include "flutter/fml/platform/android/scoped_java_ref.h"
20 const std::string& asset_name)
const = 0;
30 std::string directory);
38 std::unique_ptr<APKAssetProvider>
Clone()
const;
49 std::shared_ptr<APKAssetProviderInternal> impl_;
52 bool IsValid()
const override;
55 bool IsValidAfterAssetManagerChange()
const override;
61 std::unique_ptr<fml::Mapping> GetAsMapping(
62 const std::string& asset_name)
const override;
virtual ~APKAssetProviderInternal()=default
virtual std::unique_ptr< fml::Mapping > GetAsMapping(const std::string &asset_name) const =0
bool operator==(const AssetResolver &other) const override
APKAssetProvider(JNIEnv *env, jobject assetManager, std::string directory)
APKAssetProviderInternal * GetImpl() const
std::unique_ptr< APKAssetProvider > Clone() const
~APKAssetProvider()=default
AssetResolverType
Identifies the type of AssetResolver an instance is.