[and] Make work with real storage.
This commit is contained in:
parent
0ab14dc653
commit
67b52dfb10
2 changed files with 12 additions and 2 deletions
|
@ -9,6 +9,13 @@ class AndStorage
|
|||
{
|
||||
public:
|
||||
|
||||
|
||||
AndStorage()
|
||||
{
|
||||
// TODO: change path
|
||||
m_storage.Load("/storage/sdcard0/index.dat");
|
||||
}
|
||||
|
||||
static AndStorage & Instance()
|
||||
{
|
||||
static AndStorage storage;
|
||||
|
@ -40,7 +47,7 @@ public:
|
|||
|
||||
private:
|
||||
/// @todo Replace on Storage
|
||||
StorageMock m_storage;
|
||||
Storage m_storage;
|
||||
vector<ArticleInfo> m_result;
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.example.travelguide.thumb;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.example.travelguide.R;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
|
@ -33,7 +35,8 @@ public class AssetsThumbnailProvider implements ThumbnailsProvider
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new RuntimeException("Cant find asset: " + fullPath, e);
|
||||
// throw new RuntimeException("Cant find asset: " + fullPath, e);
|
||||
return mContext.getResources().getDrawable(R.drawable.ic_launcher);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue