forked from organicmaps/organicmaps-tmp
[android] GetReader added
This commit is contained in:
parent
ee90727d8c
commit
2594697cce
2 changed files with 19 additions and 0 deletions
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "../../base/logging.hpp"
|
||||
|
||||
#include "../../coding/zip_reader.hpp"
|
||||
|
||||
|
||||
void AndroidPlatform::Initialize(JNIEnv * env, jobject activity, jstring apkPath, jstring storagePath)
|
||||
{
|
||||
|
@ -12,6 +14,19 @@ void AndroidPlatform::Initialize(JNIEnv * env, jobject activity, jstring apkPath
|
|||
LOG(LDEBUG, ("Writable path = ", m_writableDir));
|
||||
}
|
||||
|
||||
ModelReader * AndroidPlatform::GetReader(string const & file) const
|
||||
{
|
||||
if (IsFileExists(m_writableDir + file))
|
||||
return BasePlatformImpl::GetReader(file);
|
||||
else
|
||||
return new ZipFileReader(m_resourcesDir, "assets/" + file);
|
||||
}
|
||||
|
||||
bool AndroidPlatform::IsMultiSampled() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void AndroidPlatform::GetFontNames(FilesList & res) const
|
||||
{
|
||||
/// @todo Need to make refactoring of yg fonts
|
||||
|
|
|
@ -9,6 +9,10 @@ class AndroidPlatform : public BasePlatformImpl
|
|||
public:
|
||||
void Initialize(JNIEnv * env, jobject activity, jstring apkPath, jstring storagePath);
|
||||
|
||||
virtual ModelReader * GetReader(string const & file) const;
|
||||
|
||||
virtual bool IsMultiSampled() const;
|
||||
|
||||
virtual void GetFontNames(FilesList & res) const;
|
||||
virtual int CpuCores() const;
|
||||
virtual string DeviceID() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue