Bug 1322650 - Add jni::GetAPIVersion() to get Android API version r=jchen

MozReview-Commit-ID: EfPMfS7RmcH
This commit is contained in:
James Willcox
2017-04-11 10:05:04 -05:00
parent 0954db9e0f
commit 303f04cc87
5 changed files with 15 additions and 3 deletions

View File

@@ -173,9 +173,7 @@ AndroidBridge::AndroidBridge()
AutoJNIClass string(jEnv, "java/lang/String");
jStringClass = string.getGlobalRef();
if (!GetStaticIntField("android/os/Build$VERSION", "SDK_INT", &mAPIVersion, jEnv)) {
ALOG_BRIDGE("Failed to find API version");
}
mAPIVersion = jni::GetAPIVersion();
AutoJNIClass channels(jEnv, "java/nio/channels/Channels");
jChannels = channels.getGlobalRef();