diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-12-17 08:18:08 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-01-23 15:21:56 +0000 |
commit | e0dc6dce222173bfa8fe20e1f33d24de70ea9fdd (patch) | |
tree | 8176a2acde789dd00fd4a702e210229a51c0fcb1 /src/plugins/platforms/android/extract.cpp | |
parent | aa32510430d6a5e58cb456faeb072d9f189872fe (diff) |
Android: Set minimum supported version to android-21
With the current distribution, this is 90% of active devices, and
it was released in 2014. Qt 5.12 is LTS and will continue to support
older Android versions for a long time to come.
This is to reduce the testing needed on outdated platforms and
allow ourselves to use some newer APIs unconditionally in Qt.
Android 21 was chosen because it is the minimum version that supports
64 bit builds.
[ChangeLog][Android] Increased the minimum supported Android version
to Android 5.0 (API level 21).
Fixes: QTBUG-70508
Change-Id: Ia7b4345e42ca05a25a292f11ccbb8cbd692cf8f0
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/plugins/platforms/android/extract.cpp')
-rw-r--r-- | src/plugins/platforms/android/extract.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/plugins/platforms/android/extract.cpp b/src/plugins/platforms/android/extract.cpp index 2f2ffa7126..acffa353f1 100644 --- a/src/plugins/platforms/android/extract.cpp +++ b/src/plugins/platforms/android/extract.cpp @@ -48,46 +48,6 @@ #define LOG_TAG "extractSyleInfo" #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) -extern "C" JNIEXPORT jintArray JNICALL Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo(JNIEnv * env, jobject, Res_png_9patch* chunk) -{ - Res_png_9patch::deserialize(chunk); - //printChunkInformation(chunk); - jintArray result; - size_t size = 3+chunk->numXDivs+chunk->numYDivs+chunk->numColors; - result = env->NewIntArray(size); - if (!result) - return 0; - - jint *data = (jint*)malloc(sizeof(jint)*size); - size_t pos = 0; - data[pos++]=chunk->numXDivs; - data[pos++]=chunk->numYDivs; - data[pos++]=chunk->numColors; - for (int x = 0; x <chunk->numXDivs; x ++) - data[pos++]=chunk->xDivs[x]; - for (int y = 0; y <chunk->numYDivs; y ++) - data[pos++]=chunk->yDivs[y]; - for (int c = 0; c <chunk->numColors; c ++) - data[pos++]=chunk->colors[c]; - env->SetIntArrayRegion(result, 0, size, data); - free(data); - return result; -} - -extern "C" JNIEXPORT jintArray JNICALL Java_org_qtproject_qt5_android_ExtractStyle_extractChunkInfo(JNIEnv * env, jobject obj, jbyteArray chunkObj) -{ - size_t chunkSize = env->GetArrayLength(chunkObj); - void* storage = alloca(chunkSize); - env->GetByteArrayRegion(chunkObj, 0, chunkSize, - reinterpret_cast<jbyte*>(storage)); - - if (!env->ExceptionCheck()) - return Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo(env, obj, static_cast<Res_png_9patch*>(storage)); - else - env->ExceptionClear(); - return 0; -} - // The following part was shamelessly stolen from ResourceTypes.cpp from Android's sources /* * Copyright (C) 2005 The Android Open Source Project |