Add Android user-agent info
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <jni.h>
|
||||
|
||||
#include <android/native_window_jni.h>
|
||||
#include <sys/system_properties.h>
|
||||
|
||||
#include <coffeecatch/coffeejni.h>
|
||||
|
||||
@@ -38,6 +39,7 @@ namespace android {
|
||||
std::string cachePath;
|
||||
std::string dataPath;
|
||||
std::string apkPath;
|
||||
std::string androidRelease;
|
||||
|
||||
jmethodID onMapChangedId = nullptr;
|
||||
jmethodID onFpsChangedId = nullptr;
|
||||
@@ -933,6 +935,11 @@ extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
|
||||
return JNI_ERR;
|
||||
}
|
||||
|
||||
|
||||
char release[PROP_VALUE_MAX] = "";
|
||||
__system_property_get("ro.build.version.release", release);
|
||||
androidRelease = std::string(release);
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
'type': 'static_library',
|
||||
'standalone_static_library': 1,
|
||||
'hard_dependency': 1,
|
||||
'dependencies': [
|
||||
'version',
|
||||
],
|
||||
'variables': {
|
||||
'cflags_cc': [
|
||||
'<@(png_cflags)',
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace android {
|
||||
extern std::string cachePath;
|
||||
extern std::string dataPath;
|
||||
extern std::string apkPath;
|
||||
extern std::string androidRelease;
|
||||
|
||||
extern jmethodID onMapChangedId;
|
||||
extern jmethodID onFpsChangedId;
|
||||
|
||||
Reference in New Issue
Block a user