summaryrefslogtreecommitdiffstats
path: root/src/android
Commit message (Collapse)AuthorAgeFilesLines
* Android input method improvementsPaul Olav Tvete2014-03-182-0/+3
| | | | | | | | | | | | | | 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>
* Make android non-prefix shadow build usableSamuel Gaist2014-03-141-0/+14
| | | | | | | | | | Until now android developer build was not usable due to missing files. These files are only available after a make install. This patch aims to add that copy phase when building. Task-number: QTBUG-36901 Change-Id: If0a7e982899b8c18495c7cb6508184fa153b239d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Pass the APPLICATION_PARAMETERS variable if defined.BogDan Vatra2014-03-061-5/+9
| | | | | Change-Id: I2a3c049db43bbd0a2c373dae9e9ac1395c099b74 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Display HTML text correctly on Android native dialog.BogDan Vatra2014-03-061-7/+9
| | | | | | | Task-number: QTBUG-35687 Change-Id: I3a298b7f4c5f9608537b1afdb994d76ef3abb706 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Add commercial license to BSD-licensed filesEskil Abrahamsen Blomfeldt2014-03-044-0/+40
| | | | | | | | | These files should also be usable under the commercial license terms as an alternative to the BSD license. Change-Id: If211bb63789722f655843831073ed05ee69811ea Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: Make default permissions less confusingEskil Abrahamsen Blomfeldt2014-02-261-2/+7
| | | | | | | | | | Add comments to explain the magic placeholders for default permissions and features, and move the INTERNET and WRITE_EXTERNAL_STORAGE permissions from the manifest so that we use the same mechanism for all default permissions. Change-Id: Ia62dd4314c1c10eb201b5203772ffe88b1ce7a04 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Make full use of QT_ANDROID_RASTER_IMAGE_DEPTH env variable.BogDan Vatra2014-02-223-6/+10
| | | | | | | | 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>
* Rework the splash screen for Android.BogDan Vatra2014-02-215-20/+23
| | | | | | | | | | | | | Allow the developers to define a splash screen which will be visible until the first window is created. [ChangeLog][Android] Allow the developers to define a splash screen which will be visible until the first window is created. Task-number: QTBUG-30652 Change-Id: I5da80be417ffffb03e66009f45745d4b387d2912 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Add enablers for listening to activity resultsEskil Abrahamsen Blomfeldt2014-02-152-0/+18
| | | | | | | | | | | | | | | | | | | 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>
* Android: Add Foreign Window supportChristian Strømme2014-02-142-5/+43
| | | | | Change-Id: Ie41edd3f17214805673311a375191cd93d2378f6 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Only Android API < 11 needs o set the surface type.BogDan Vatra2014-01-311-1/+3
| | | | | Change-Id: I290d7273624ce4853a137c00263fa9a169ea0cf9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove unused variable.BogDan Vatra2014-01-311-2/+0
| | | | | Change-Id: I30c6bea769df436f41275df60552b9616e8d5547 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-201-8/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| * Fix Use android theme when definedThorsten Zachmann2014-01-111-8/+16
| | | | | | | | | | | | | | | | | | | | | | It is possible to define the theme to use for android in the AndroidManifest.xml. If it is defined in the activity qt itself should not overwrite it. The change uses the defined style in case it is given in the AndroidManifest.xml. This seems to fix also QTBUG-35151. Task-number: QTBUG-35050 Change-Id: I8b55c02ca1ecd7baa5f2f9460d154095aacf015f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Support multiple native surfaces on Android.BogDan Vatra2014-01-175-169/+118
|/ | | | | | | | | | | | | | | | Support for multiple native surfaces is needed by applications that need to mix raster windows with GL windows. Rework the raster and opengl implementation, get rid of eglfs and fbconvenience dependencies. Create a single android platform plugin. [ChangeLog][Android] Rework the raster and opengl implementation. [ChangeLog][Android] Create a single android platform plugin. Task-number: QTBUG-34650 Change-Id: I9b1ab51554823329dda8cfbf8fef27c38f917c7b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Refactor the InputType mapping code.Christian Strømme2014-01-071-35/+41
| | | | | | | | | | - Fix issue where input flags and classes where wrongly mixed. - Adds DATETIME class (support for Qt::ImhDate/Qt::ImhTime). - Adds TYPE_NUMBER_VARIATION_PASSWORD for API level > 10. Task-number: QTBUG-35198 Change-Id: I794159ca7c19d38b0b97521448cef0f5112ee8ba Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: let fullscreen use entire screenPaul Olav Tvete2014-01-031-0/+38
| | | | | | | | API level 19 (Android 4.4) introduces "immersive" mode which lets the app use the entire screen. Change-Id: I12f6aebaf1303cdc5b6bfb51944e895351fa2406 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Overwrite plugin cache when APK is updatedEskil Abrahamsen Blomfeldt2014-01-031-10/+116
| | | | | | | | | | | | | | | | | | | | | | | | | To allow updating APKs with new versions of Qt, we need to delete the old cache when the APK is updated. This patch does two things: 1. Move the plugins (and imports/qml) into a directory called qt-reserved-files/ to better separate the cache from the rest of the application. The first time the files are put here, we will delete the old cache in <datadir>/plugins, <datadir>/imports and <datadir>/qml if they exist to avoid leaving old files around forever. 2. Add versioning to the cache and flush it every time the APK is reinstalled. Potentially, the libraries in the APK can change for every reinstall, so this is the safest approach. Task-number: QTBUG-35129 [ChangeLog][Android][QTBUG-35129] Update deployed plugins and imports when APK is updated on the device. Change-Id: Ie38b639db2cfba8a521acc875c4afd5e07df3efd Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Don't show ActionBar at startup.BogDan Vatra2014-01-021-4/+2
| | | | | | | Task-number: QTBUG-35151 Change-Id: Ie62e50032aaa647a86c4f03b1a3363e5ef6a1bbb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-052-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_post.prf tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp Change-Id: Iaba97eed2272bccf54289640b8197d40e22f7bf5
| * Default to 5.2 source repository for Qt 5.2.xBogDan Vatra2013-12-032-2/+2
| | | | | | | | | | | | | | | | | | We can't use latest anymore because the qreal change is not back compatible and all the apps that used latest will stop to run when Ministro will upgrade the libs. Change-Id: I5286e72eccf86b4dead773a637aa28e29d120605 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Report hardware acceleration in default manifestEskil Abrahamsen Blomfeldt2013-12-041-1/+1
|/ | | | | | | | | | | | | | | Qt applications require the "hardwareAccelerated" flag set on some devices or Android versions. The symptoms that this was missing was problems when handling orientation changes. When the target SDK version is >= 14, it is true by default, but for lower versions it is not. There is no reason to set this to false for a Qt application, since we don't use any of the unsupported 2D drawing operations in the documentation, so lets just set it to true for all applications. Task-number: QTBUG-35293 Change-Id: Ie131a52a2a3fc5a520d0c5dd5d64f79269e9b6b5 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Remove invalid error messageEskil Abrahamsen Blomfeldt2013-11-261-3/+1
| | | | | | | | | | All usage of context menus prints out an error message because onContextMenuClosed() is called more than once. We just return silently instead if the method is called after the menu has already been closed. Change-Id: Ifa27ed42d188fdf670f09c4b1450b9fec0d5941f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* REG: Fix changing input method parameters on AndroidEskil Abrahamsen Blomfeldt2013-11-142-0/+15
| | | | | | | | | | | | | | | | | | | After b7440536c788b04861591187edd071bf2c2ec137, we no longer restart the input method when the keyboard is shown, even if the parameters for the input method has changed. The effect was that if you had opened a keyboard with, say, digits only, then all keyboards would be digits only forever, regardless of the settings on text input. This patch tries to be conservative, so it only adds back the restartInput() logic when any of parameters have actually been changed. Tested the code the original patch was made to fix and it still works as before. Task-number: QTBUG-34827 Change-Id: Icaee6026d5c3e95b605bb76485acf4fd651f81bd Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android native message dialogBogDan Vatra2013-11-093-3/+429
| | | | | Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Allow modules to specify permissions/featuresEskil Abrahamsen Blomfeldt2013-11-071-0/+2
| | | | | | | | | | | | Some modules, such as Qt Multimedia, needs special permissions to avoid getting exceptions at run-time. We should apply these by default to the AndroidManifest.xml so that an application using e.g. the camera will work out of the box. Task-number: QTBUG-33953 Change-Id: Ibc1f086d249197b63e7ed1075ae7d54bdd1212f2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: allow installing apps to SD card by defaultPaul Olav Tvete2013-11-071-1/+1
| | | | | | | Task-number: QTBUG-34423 Change-Id: I3b2c8a12b113a35f8b8454191d8ba8832d9fd995 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix registerClipboardManager semaphore initializationBogDan Vatra2013-11-061-1/+1
| | | | | | | Task-number: QTBUG-34582 Change-Id: Idc6c821f768f90adf13af2070affe2ccf89a1450 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Catch any startActivity exceptionsBogDan Vatra2013-11-061-3/+7
| | | | | | | Task-number: QTBUG-34600 Change-Id: I7147f0e6b7788df9e706e70758300d4d786032fc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Fix menu on API-11+BogDan Vatra2013-11-062-5/+74
| | | | | | | | | | | On API-11+ if there is no hardware menu button show the action bar. Fix menu when using the opengl android plugin. Task-number: QTBUG-32002 Change-Id: I45bd49107621e4cab85eb6411897229e20bb8281 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: prevent main activity to be recreated.BogDan Vatra2013-11-061-1/+1
| | | | | | | | Add more config changes needed for API 13+ API 13+ is mandatory to build any Qt for Android application. Change-Id: I595f7174dd2fc8a0865772f9780ce606e1f1fcf1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Add better version checks for accessibilityFrederik Gladhorn2013-11-051-15/+17
| | | | | | | | | | | We would spam the debug output on devices with api < 16 with some warnings that the super class a11y delegate could not be found and others. Instead check the runtime version before trying to load the JNI code and only load the delegate if api is new enough. Change-Id: I52286cb99924b034b9b58c53566f15030939b0c9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Handle virtual keyboard visibility changes.BogDan Vatra2013-11-014-64/+98
| | | | | | | | | emitInputPanelVisibleChanged when virtual keyboard visibility is changed. Task-number: QTBUG-34347 Change-Id: Iab7374db42ff8ce6f33dcc793b23f84d3c8692d5 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove android specific qmake variables.BogDan Vatra2013-10-311-1/+1
| | | | | Change-Id: Iba2b929ba70588ffcbcc9395501753521cfe5154 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix the show/hide logic.BogDan Vatra2013-10-292-15/+45
| | | | | | | | | | Make sure the back key event is not sent to applicaton as long as the keyboard is still visible. Task-number: QTBUG-30803 Change-Id: I8063981a96ddb8e065c1281b1bdc0fb4a2895bc2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Allow the user to specify a theme list.BogDan Vatra2013-10-291-27/+58
| | | | | | | | | Cleanup the theme handling. Set default theme, needed by native dialogs. Needs Ministro v9.6+. Change-Id: Ia131edd8712b7737d3118d714c7772adb8f27acd Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Cleanup java files.BogDan Vatra2013-10-253-3/+1
| | | | | | | Remove unused imports Change-Id: I9752ff3593cf97153133381736ef3c8c62898bd7 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix deploy mechanism.BogDan Vatra2013-10-231-2/+2
| | | | | | | | | The order of "android:value" and "android:name" attributes can be changed when saving the XML document. Use placeholders instead. Change-Id: I9a97bb0df2d2d16c8a9443a21ce7d3290e0ab466 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Move untranslatable stings to AndroidManifest.xmlBogDan Vatra2013-10-233-13/+8
| | | | | | | strings.xml file is used to store strings that can/should be internationalized. Change-Id: I2fc305b6917752e9f502bd4beb172205ba4f9fba Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Make it possible to pass arguments via intent extrasEskil Abrahamsen Blomfeldt2013-10-161-0/+8
| | | | | | | | | | | | | | | Needed for autotest script, so that we can pass command line arguments to Qt Test. This can now be done by: % adb shell am start \ -e applicationArguments "argument1 argument2" \ <INTENT> Change-Id: I772209f66da055c6a0b01b709f36e33fdb5c2ed6 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix backspace bug with 4.3 stock keyboardPaul Olav Tvete2013-10-091-0/+7
| | | | | | | | | | The Android 4.3 keyboard will cause setComposingRegion() to be called when backspacing over an existing word. If we don't implement that, the editor will be out of sync with the input method. Task-number: QTBUG-32955 Change-Id: I6c4ff786269a4e74c70a093c5f03c4c5a5727dd5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Fix black screen when changing orientationEskil Abrahamsen Blomfeldt2013-10-091-1/+1
| | | | | | | | | | | When targeting API level 13 or higher, you need to explicitly subscribe to configuration changes for screen size, otherwise surfaceChanged() will not be called when you change the orientation of the screen. Task-number: QTBUG-33140 Change-Id: I48fd1d298c408802d1743736f62128cd0eec8983 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Don't throw away slow-moving mouse/touch eventsPaul Olav Tvete2013-10-031-2/+2
| | | | | | | | | | | | | | | When doing slow, precise movements, some devices will report differences of less than 1 pixel. This would mark the points as stationary, meaning that Qt would discard them without reporting. On the three devices I have tested, stationary points are reported with a 0.0 difference. If any devices are reporting noisy values, it is still safer to test for equality, since it is much better to report too many move events than to not report any. Task-number: QTBUG-33729 Change-Id: If20f2758f5a5ec0917184345b558f55a3d383807 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: update copied enum values in Java codePaul Olav Tvete2013-10-021-12/+17
| | | | | | | | | | | The InputMethodHint enum values were changed between Qt 4.8 and 5.1, and the hardcoded copies were not updated. Thanks to Lasconic for finding the solution to this problem. Task-number: QTBUG-32072 Task-number: QTBUG-32710 Change-Id: I3eb1192911a9c48d7720e85b91bee1af693a669d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove logic which changes install rules inside Qt dirEskil Abrahamsen Blomfeldt2013-09-261-1/+1
| | | | | | | | | | | | | | A common problem is that examples and other apps are unusable on Android when they are inside the Qt directory. There doesn't really seem to be any good reason for having a special case in place, since this will only affect applications which are not built with the host toolchain, and we aren't building any command line apps for the target devices. So the only thing this will affect are the examples and we want those to be installed into the correct path. Change-Id: Ibae365e06eb77944f11e596c16c3c5baf798848c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: fixed arguments passed to the Qt application.Yoann Lopes2013-09-241-2/+2
| | | | | | | Removed extra empty parameter. Change-Id: Iad5becf05801118d0f6d2ec2cc1ec255eaa9e872 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: handle inverted orientationsPaul Olav Tvete2013-09-202-8/+19
| | | | | | | | | | Add logic to detect InvertedPortrait and InvertedLandscape orientations and implement QPlatformScreen::nativeOrientation() for Android. Task-number: QTBUG-32144 Change-Id: I294506714ea0faa9eacd7a15e1cfc45342659964 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Add tokens for androiddeployqt in template filesEskil Abrahamsen Blomfeldt2013-09-193-20/+41
| | | | | | | | | Make it possible for the androiddeployqt tool to replace certain parts of the template with data from the .pro file. Task-number: QTBUG-32856 Change-Id: Iaedd2076bc1ea5dac0b94624c0ba3a755d2a08f3 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Fix Android Style plugin.BogDan Vatra2013-09-102-4/+13
| | | | | | | | Task-number: QTBUG-29565 Change-Id: Iedb861962e3638bcbdf9d9a72a47bebc63b425b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: added ApplicationState capability.Yoann Lopes2013-08-282-0/+20
| | | | | | | | | | | | The application state is tied to the QtActivity lifecycle. Mapping of states between Android and Qt is as follows: onResume --> ApplicationActive onPause --> ApplicationInactive onStop --> ApplicationSuspended Change-Id: Iefef08d6c7a7fde28fba1f4886882458cda6a0c0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>