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_;
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 IsValid() const override
bool operator==(const AssetResolver &other) const override
std::unique_ptr< fml::Mapping > GetAsMapping(const std::string &asset_name) const override
APKAssetProviderInternal * GetImpl() const
const APKAssetProvider * as_apk_asset_provider() const override
std::unique_ptr< APKAssetProvider > Clone() const
bool IsValidAfterAssetManagerChange() const override
Certain asset resolvers are still valid after the asset manager is replaced before a hot reload,...
AssetResolver::AssetResolverType GetType() const override
Gets the type of AssetResolver this is. Types are defined in AssetResolverType.
~APKAssetProvider()=default
AssetResolverType
Identifies the type of AssetResolver an instance is.
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)