summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android
Commit message (Collapse)AuthorAgeFilesLines
...
* Android: use glyph cache resizing workaround with Vivante GC1000 GPU.Yoann Lopes2014-04-071-1/+2
| | | | | | Task-number: QTBUG-38102 Change-Id: I9f423e15b9cbc3d2f424871f47795052b1f53e09 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: input method fixes for SwiftEdit keyboardPaul Olav Tvete2014-03-311-10/+42
| | | | | | | | | | | | * Report correct pre-edit information when calling updateSelection() on endBatchEdit() * Fix getExtractedText() to report the correct offset and cursor position, * Fix setSelection() to use the correct cursor position. Task-number: QTBUG-35689 Change-Id: I7e8427d0f5a18abf18ba2faf9d510756ddf6044b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: eglBindAPI() won't return on certain devices.Christian Strømme2014-03-291-3/+3
| | | | | | | | | | On some devices eglBindAPI() will block forever if called before eglInitialize(). Task-number: QTBUG-37635 Change-Id: Id27f37e3efcd2ff16e97e1f3381ac3ae8ae0ef33 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Android: implement batch editing for input methodsPaul Olav Tvete2014-03-282-6/+53
| | | | | | Task-number: QTBUG-37584 Change-Id: I59f063b2e4b6427a66f7b561cfae7193ceafa43c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Convert plain text to html text for native dialogs.BogDan Vatra2014-03-281-4/+15
| | | | | | | Task-number: QTBUG-37824 Change-Id: I380b41d300b198b6cf3060bbecb5b98e0190b69a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: registerTouchDevice at startupBogDan Vatra2014-03-271-0/+33
| | | | | | | | | | I'd like to keep registerTouchDevice from androidjniinput.cpp, touchEnd as a backup for buggy Android devices that are not setting Configurations.touchscreen field correctly. Task-number: QTBUG-36007 Change-Id: Ib8f107474baa278b2d82d9ca14913512dfff01c2 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Don't create screen surface if there are no raster windows.BogDan Vatra2014-03-273-3/+15
| | | | | | Change-Id: Idaf5df814bb087707654d7ad7046ba8799f99c0a Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: use fbo read back workaround with specific GPUs.Yoann Lopes2014-03-274-4/+22
| | | | | | | | | | | | | Namely, the Mali 400 and the Adreno 200. We used to enable this workaround only for the Samsung Galaxy Tab 3, which has a Mali 400. The same problem was confirmed with the Samsung Galaxy Note N7000 (Mali 400) and the ZTE Blade (Adreno 200). Task-number: QTBUG-33951 Task-number: QTBUG-34984 Change-Id: Ic624962986f718285b98ab4ca48e22f9aa110753 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* REG: Fix window repaint geometryBogDan Vatra2014-03-261-2/+2
| | | | | | | Task-number: QTBUG-37530 Change-Id: I642c8ef8cf7de50e4a84d8356693b82f8674cece Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix font mergingEskil Abrahamsen Blomfeldt2014-03-252-4/+17
| | | | | | | | | | | | | Our fallback fonts would contain a minimal list of hardcoded fallback fonts, which is neither sufficient for displaying all text, nor portable to different vendors which can supply different font sets. [ChangeLog][Android] Fixed font merging problem which caused e.g. missing glyphs for Arabic numerals. Task-number: QTBUG-37738 Change-Id: Ic971343a1cd5610c79a81f6f6152c637937b5626 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* REG: Android: Fix freeze when accessing assetsEskil Abrahamsen Blomfeldt2014-03-211-1/+0
| | | | | | | | | | | Change 287fa94fe2f93e2857a4c15f69435c4ea14de82e created a freeze in the assets file engine because it will try locking the mutex twice. Since prepopulateCache() is only called from create(), we don't need to lock it recursively. Task-number: QTBUG-37661 Change-Id: I00d0fed132a86c1be5603484eb6ee05454da9ef0 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Re-enable threaded renderingEskil Abrahamsen Blomfeldt2014-03-201-1/+2
| | | | | | | | | | | | | | | In Qt 5.2.x, the platform plugin inherited from the EGLFS platform plugin, so calling the super class implementation of hasCapability() would return true for ThreadedOpenGL. Since this link was removed in Qt 5.3, we would return false for all devices, giving us a large performance regression. Task-number: QTBUG-37586 Change-Id: I27758649ee9c0921902787b93be943751c839eb8 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Android input method improvementsPaul Olav Tvete2014-03-183-34/+76
| | | | | | | | | | | | | | Use the new inputmethod query API. and get rid of the hack where we would move the cursor back and forwards to make sure that the Android software keyboard noticed that the cursor had moved. The android plugin now uses absolute positions instead of position within the paragraph for all cursor handling (provided that the control supports the new API). Task-number: QTBUG-37511 Change-Id: I03463dbbcb4acbfa41e2eab06889d021d50da01f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Delay the set of the BackingStore if window->handle() is null.BogDan Vatra2014-03-152-7/+17
| | | | | | | Task-number: QTBUG-37458 Change-Id: Idddfe1876aff3d14d8c6c060d04236c5dc611bce Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Fix another "QApplication not on main() thread" crashEskil Abrahamsen Blomfeldt2014-03-152-4/+12
| | | | | | | | | | | | | | The assets file engine is created before main() is called, thus prepopulate was called before main(). In this function, we created a QDataStream which internally created a QBuffer which inherits from QObject. This caused the main thread pointer to be initialized early, and the old "QApplication is not on the main() thread" warning and crash returned. The fix is to prepopulate the first time the file engine is used instead. Task-number: QTBUG-37444 Change-Id: I2c6e5f1a8ca88b5dc7d8e145fffeb7587dc0e623 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Use proper empty strings in key eventsPaul Olav Tvete2014-03-141-2/+8
| | | | | | | | | | | A key event with no unicode would get a text of "\0" instead of the empty string. This would lead to various widgets interpreting the Key_Back event as text input, meaning that it would be grabbed by the widget instead of being propagated. Task-number: QTBUG-35784 Change-Id: Ibdb0e491572e41dd1aaf3b03ae1a780731f0559a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove unused parameter from QEGLPlatformContext constructorLaszlo Agocs2014-03-101-1/+1
| | | | | | | | The API is chosen via QSurfaceFormat, the constructor argument is ignored. Remove this historical artifact. Change-Id: I4a5c1e12cb297de22f239ad0a6747c1c36168eed Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Android: Support double click eventEskil Abrahamsen Blomfeldt2014-03-101-1/+25
| | | | | | | | | | | | | | | | It's impossible to get the distance between two touch events down to 5 pixels on e.g. my Nexus 5. This patch makes it possible to tweak the distance through the platform theme, and sets the distance to 15% of an inch on Android. Also provides a way to override the default minimum of 5 pixels by using an environment variable. [ChangeLog][Android] Fixed double click events Task-number: QTBUG-36974 Change-Id: I23d94020c531747d6638b645133611614a2a0703 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Avoid creating a new QMimeData each time the Android clipboard is usedSamuel Gaist2014-03-062-4/+6
| | | | | | | | | | | | This patch aims to fix a memory leak that occurs when the platform clipboard is used on Android. The QMimeData from the clipboard is recreated each time mimeData is called [ChangeLog][QtCore][QPA/Android] Fixed a memory leak in the clipboard Task-number: QTBUG-36025 Change-Id: I241f586589ff256885caee5e5f737313d24d942d Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: avoid crash with toplevel QGLWidgetPaul Olav Tvete2014-03-011-1/+4
| | | | | | | Task-number: QTBUG-37096 Change-Id: I14db37a78314782d7b5897db946283bd0063e348 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Support pregenerated cache in assets file engineEskil Abrahamsen Blomfeldt2014-02-262-24/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a way for androiddeployqt to pregenerate the entry list cache for the assets file engine, greatly improving performance the first time a directory is read. If the file is not present, the cache will operate as before. Some numbers from testing on Samsung Galaxy 2, doing QDir::entryList() on a directory inside the assets folder: 10 files -------- Before: 280 ms for first read, 5 ms for subsequent reads After: 2 ms for reading pregenerated cache 5 ms for first read 5 ms for subsequent reads 2000 files ---------- Before: 1000 ms for first read, 150 ms for subsequent reads After: 5 ms for reading pregenerated cache 150 ms for first read 150 ms for subsequent reads 4000 files ---------- Before: 3000 ms for first read 300 ms for subsequent reads After: 8 ms for reading pregenerated cache 300 ms for first read 300 ms for subsequent reads [ChangeLog][Android] Speed up first time directory listing in assets by using pregenerated entry list. Task-number: QTBUG-33704 Change-Id: I3973a1d823b8b38e88a2cc7843326cbe885f8bc2 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Make full use of QT_ANDROID_RASTER_IMAGE_DEPTH env variable.BogDan Vatra2014-02-224-6/+7
| | | | | | | | If raster only apps set QT_ANDROID_RASTER_IMAGE_DEPTH to 16 (RGB16), we should create also RGB16 native surface. Change-Id: I82692ff34b0e604e627d1d86a437272e3700daf8 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Start the chronometer.BogDan Vatra2014-02-211-0/+1
| | | | | Change-Id: Ia165ce4a79b108ddb0d74a7d8fccd4f48fe14442 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Sort include headersBogDan Vatra2014-02-211-7/+6
| | | | | Change-Id: I453a40d57a7c3d6062c23f6772de1b8330f61067 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix paint artifacts.BogDan Vatra2014-02-213-32/+31
| | | | | | | | Android is using double buffering, so, we need to repaint the bounding rect of the repaint region, otherwise black holes will appear. Change-Id: I21f36a6f5f1a6c64b605c0fef3af10dfdc5ec6e2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-184-5/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/android/qandroidplatformtheme.h Change-Id: I541bd3069df3ab54c7942d5f4a9e155e3b6566a0
| * Android: Build fix for "-no-widgets"Alessandro Portale2014-02-174-4/+2
| | | | | | | | | | | | | | | | | | | | This fixes compilation of Qt for Android when configured with "-no-widgets". One good use-case for that configure switch is that QtSvg loses the dependency to QtWidgets. Change-Id: I8a645d9fee6ce0467ff0b5d1d62531b7c6272aab Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* | Android: Add enablers for listening to activity resultsEskil Abrahamsen Blomfeldt2014-02-151-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you launch an activity through an intent, data can be provided back from the activity when it has finished using onActivityResult() in the activity which launched it. This is okay for applications, since they can easily create their own activities, but does not work for libraries that need to use intents. There is no listener API for activity results which allow external classes to eavesdrop. In order to support launching intents from third-party or add-on libraries, we provide a low-level way to hook into the activity result event. The corresponding public API will be added to QtAndroidExtras. Change-Id: I89417f485e2c0e69028dcccc7c155788346a7417 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Consolidate StandardButton, ButtonRole and related static functionsShawn Rutledge2014-02-152-7/+7
| | | | | | | | | | | | | | | | | | | | Moving them into QPlatformDialogHelper for the convenience of both widgets and QtQuick.Dialogs. The main reason is to ensure that QtQuick.Dialogs does not need to depend on the widgets module, in order to re-implement the button box concept in a generic dialog. Change-Id: If400d215338d7cb6dade39d9de60e50b5e7515ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Android: Add Foreign Window supportChristian Strømme2014-02-146-3/+170
| | | | | | | | | | Change-Id: Ie41edd3f17214805673311a375191cd93d2378f6 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: Fix return value in createSurface()Christian Strømme2014-02-141-1/+1
| | | | | | | | | | | | | | When the function fails it should return -1 Change-Id: I132a1521897295e6e232126ca51e30d2e32656c8 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: default palette taken from the Holo Light themeShawn Rutledge2014-02-122-1/+36
| | | | | | | | | | | | | | | | | | Currently QAndroidPlatformTheme::palette has been returning null so the default colors came from elsewhere. Now they will default to colors taken from the Holo Light theme to the extent possible. Change-Id: I022c5ef679d9d0dcb76721a4d520492bc8a6f4cf Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-02-115-18/+58
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-075-18/+58
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| | * Cleanup of the android clipboard handlingSamuel Gaist2014-01-232-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there's an unguarded class member for the clipboard, allocated but unused and not deleted in the destructor. The getter creates a static clipboard allocated on the heap. This patch aims to add the missing guards as well as use the class member. Task-number: QTBUG-36025 Change-Id: I86969390eebcd67b65707e3ecbd4b3be15c7dadb Reviewed-by: BogDan Vatra <bogdan@kde.org>
| | * Work around FBO readback bug on Samsung Galaxy Tab 3Eskil Abrahamsen Blomfeldt2014-01-213-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Symptom of the error is garbled text in Qt Quick 2, and the fix has been confirmed to be enabling the texture resize workaround. Task-number: QTBUG-34984 Change-Id: If6f621b43120c7913cbd33ab326c52ad6e2599bc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| | * Use non-threaded render loop on Samsung Galaxy Tab 3Eskil Abrahamsen Blomfeldt2014-01-174-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We get EGL_BAD_ACCESS from eglMakeCurrent() on this device, and only on this device, so we simply work around it by disabling the threaded render loop. [ChangeLog][Android] Add workarounds for OpenGL bugs on Samsung Galaxy Tab 3. Task-number: QTBUG-34984 Change-Id: I309881f8317473ff87aea2f92d0f6f1b898342d3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Force surface repaint after is (re)created.BogDan Vatra2014-02-071-0/+1
|/ / | | | | | | | | | | | | | | | | Every time when a surface is (re)created we must paint something in it otherwise it will appear black. Task-number: QTBUG-36594 Change-Id: Ib4baaef189f59a83a251cf89db30b0a3aec16d92 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Adds the ability to not have an activity on AndroidThierry Bastian2014-02-051-31/+43
| | | | | | | | | | | | | | | | | | That code allows for not having an activity on Android. In my case I've made some java code to handle an Android service. The code is mainly about not dereferencing null pointers. Change-Id: Ia7fda03cbbc55e6afeacd928445a4b72b51c679e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Disable the rendering profilingBogDan Vatra2014-01-311-2/+5
| | | | | | | | | | Change-Id: Ia2d6216104c66a4b2e7bfb36418c13eaa51f55e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Fix the repaint position.BogDan Vatra2014-01-311-1/+1
| | | | | | | | | | | | | | | | The geometry is used to set the dirty region of the screen, so it must be translated in screen coordinates. Change-Id: Ic559a0a0d0e840cb2aa27ae1b02dcc140b29556f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Don't add/remove/lower/raise children windows to the TLW stack.BogDan Vatra2014-01-311-0/+12
| | | | | | | | | | Change-Id: I4fe6b05fe2a7d6de7c8ecaf9934fd8e285b2c64e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Fix repaint of transparent images.BogDan Vatra2014-01-312-65/+47
| | | | | | | | | | | | | | Remove the native bitmap and paint directly on the surface instead. Change-Id: Ie7010d97aa934a170c079de549903fc3391df4d9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Fix surface leak, cleanup opengl window.BogDan Vatra2014-01-312-11/+5
| | | | | | | | | | | | | | | | | | | | ANativeWindow_fromSurface already acquires the surface, no need to call ANativeWindow_acquire. Remove unused variables. Change-Id: I563573072687927256aef76fab20f645f35778a2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Sort include headersBogDan Vatra2014-01-311-8/+7
| | | | | | | | | | Change-Id: Ib987ee7c6e2cfcabd725fde4399c968a11dc0868 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Shut up setParent warning.BogDan Vatra2014-01-312-1/+6
| | | | | | | | | | Change-Id: I43af8bf83d3071f7c1d2eff082df5b1414f553b8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Android: Don't skip first file in assets entry listEskil Abrahamsen Blomfeldt2014-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're using AAssetDir_getNextFileName() to verify that the directory exists and has content, and this moves the current file pointer to the second file in the dir, so we need to reset the pointer before iterating to populate the entry list. [ChangeLog][Android] Fixed QDir::entryList() for assets scheme to no longer skip the first file in the directory. Task-number: QTBUG-36528 Change-Id: I9938c669658330b0e11d6fbe3df8c6566fd79f5f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: Remove debug output from platform windowEskil Abrahamsen Blomfeldt2014-01-211-6/+0
| | | | | | | | | | | | | | Some debug info and a #warning had somehow made it through :) Change-Id: I420a7637bfd5d1a79a342eacefcc35430994feff Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Android: Don't crash on 100+ combo box itemsEskil Abrahamsen Blomfeldt2014-01-201-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Local references are valid until the original native method returns (if it's a Java thread), or until the current thread is detached from the VM. This means that we have to manually manage local references and delete them when they are no longer in use, otherwise we will leak memory and flood JNI's local reference array. [ChangeLog][Android] Fixed crash on populating large combo boxes or menus. Task-number: QTBUG-36074 Change-Id: I7095bd1472f759be98183737a8d3912fa9763f30 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Introduce function for standard button texts to QPlatformTheme.Friedemann Kleint2014-01-183-45/+23
| | | | | | | | | | Change-Id: I91eec04a95b5047d893490a70152237b2991f662 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>