Add Android user-agent info

This commit is contained in:
Leith Bade
2014-12-10 19:14:05 +11:00
parent 69cd7268d7
commit 2db8134d20
3 changed files with 11 additions and 0 deletions

View File

@@ -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;
}