mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
StaticObject class
This commit is contained in:
parent
8a9d0d4c64
commit
86a07a0d1b
10 changed files with 111 additions and 44 deletions
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <AndroidUtil.h>
|
||||
#include <JniEnvelope.h>
|
||||
|
||||
#include "Library.h"
|
||||
|
||||
|
@ -45,7 +46,7 @@ Library::~Library() {
|
|||
|
||||
std::string Library::cacheDirectory() const {
|
||||
JNIEnv *env = AndroidUtil::getEnv();
|
||||
jstring res = (jstring)env->CallStaticObjectMethod(myPathsClass, AndroidUtil::SMID_Paths_cacheDirectory);
|
||||
jstring res = (jstring)AndroidUtil::StaticMethod_Paths_cacheDirectory->call(myPathsClass);
|
||||
const char *data = env->GetStringUTFChars(res, 0);
|
||||
std::string str(data);
|
||||
env->ReleaseStringUTFChars(res, data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue