summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-04-02 12:34:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-15 13:20:17 +0200
commitc1ac77b34c20be797502551a9c57f7b4b2d20aae (patch)
tree86e3343baf177177f0c02a5e70487895251af69f /src/plugins/platforms/android
parent72e9cad5602c2fe50d3978c6b3d05dc503135dfc (diff)
Remove code for Android API level < 9
We don't support API levels < 9, so we can simplify this code a little. Change-Id: I9823d4c5a44d265e03dec0ceedeeb3c34a1e1eab Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/plugins/platforms/android')
-rw-r--r--src/plugins/platforms/android/src/androidjnimain.cpp37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/plugins/platforms/android/src/androidjnimain.cpp b/src/plugins/platforms/android/src/androidjnimain.cpp
index 36d95b0816..cd7fa25da7 100644
--- a/src/plugins/platforms/android/src/androidjnimain.cpp
+++ b/src/plugins/platforms/android/src/androidjnimain.cpp
@@ -74,9 +74,7 @@
# include "qandroidopenglplatformwindow.h"
#endif
-#if __ANDROID_API__ > 8
-# include <android/native_window_jni.h>
-#endif
+#include <android/native_window_jni.h>
static jmethodID m_redrawSurfaceMethodID = 0;
@@ -543,32 +541,6 @@ static void terminateQt(JNIEnv *env, jclass /*clazz*/)
env->DeleteGlobalRef(m_bitmapDrawableClass);
}
-#ifdef ANDROID_PLUGIN_OPENGL
-#if __ANDROID_API__ < 9
-struct FakeNativeWindow
-{
- long long dummyNativeWindow;// force 64 bits alignment
-};
-
-class FakeSurface: public FakeNativeWindow
-{
-public:
- virtual void FakeSurfaceMethod()
- {
- fakeSurface = 0;
- }
-
- int fakeSurface;
-};
-
-EGLNativeWindowType ANativeWindow_fromSurface(JNIEnv *env, jobject jSurface)
-{
- FakeSurface *surface = static_cast<FakeSurface *>(env->GetIntField(jSurface, m_surfaceFieldID));
- return static_cast<EGLNativeWindowType>(static_cast<FakeNativeWindow*>(surface));
-}
-#endif // __ANDROID_API__ < 9
-#endif // ANDROID_PLUGIN_OPENGL
-
static void setSurface(JNIEnv *env, jobject /*thiz*/, jobject jSurface)
{
#ifndef ANDROID_PLUGIN_OPENGL
@@ -753,12 +725,7 @@ static int registerNatives(JNIEnv *env)
#ifdef ANDROID_PLUGIN_OPENGL
FIND_AND_CHECK_CLASS("android/view/Surface");
-#if __ANDROID_API__ < 9
-# define ANDROID_VIEW_SURFACE_JNI_ID "mSurface"
-#else
-# define ANDROID_VIEW_SURFACE_JNI_ID "mNativeSurface"
-#endif
- GET_AND_CHECK_FIELD(m_surfaceFieldID, clazz, ANDROID_VIEW_SURFACE_JNI_ID, "I");
+ GET_AND_CHECK_FIELD(m_surfaceFieldID, clazz, "mNativeSurface", "I");
#endif
jmethodID methodID;