summaryrefslogtreecommitdiffstats
path: root/src/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: Don't accept the volume-key events.Christian Strømme2014-04-031-0/+15
| | | | | | | | | | | | | | | | | On Android the volume keys are by default connected to the global volume control and by accepting them we remove this feature. Meaning each application would need to re-implement this functionality. Ideally we should only accept the volume keys if they where accepted by the user to avoid overriding default behavior, but we currently don't have the infrastructure to do that. To revert back to the old behavior the env. variable QT_ANDROID_VOLUME_KEYS can be set. Task-number: QTBUG-36570 Change-Id: Ib053a40383f2de452f385b19f7795c2fc23fc4fe Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: implement batch editing for input methodsPaul Olav Tvete2014-03-281-2/+4
| | | | | | Task-number: QTBUG-37584 Change-Id: I59f063b2e4b6427a66f7b561cfae7193ceafa43c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Change Ministro's source to 5.3BogDan Vatra2014-03-271-1/+1
| | | | | | Task-number: QTBUG-37879 Change-Id: If9a3f38a5dc267862a166ac4c8e6940739eab911 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: REG: Fix launching intentsEskil Abrahamsen Blomfeldt2014-03-271-1/+1
| | | | | | | | | | | | | | | When the launch mode is singleInstance, then intents will not be launched as activities inside the same task, but as separate tasks, and onActivityResult() is always called immediately without any data. This is documented in various stack overflows and google group messages if you search for it on the Internet, and the singleInstance launch mode is documented as "not recommended for normal use". This broke e.g. automatic downloads of Ministro. The singleTop launch mode seems more like what we're after, and fixes both the original issue as well as the current problem with intents. Change-Id: Iab24a654a4433f979064509b1ef721db9ef352af Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix software keyboard show/hide stateBogDan Vatra2014-03-262-41/+20
| | | | | | | Task-number: QTBUG-34831 Change-Id: Ic38334d011ceef2dc75e4fb3fcea48f62aeea757 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Set default activity launchMode to singleInstanceBogDan Vatra2014-03-251-1/+2
| | | | | | | | | | This attriute is needed otherwise if the user puts the application in background and uses the appication icon to bring it back in front, andriod will create a new activity. Task-number: QTBUG-37186 Change-Id: Icdc87239c1a07a3e555296692a4866eb6351348e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* REG: Fix compilation with old AndroidManifest.xmlEskil Abrahamsen Blomfeldt2014-03-211-0/+2
| | | | | | | | | | | | | | | | | | For apps created with Qt 5.2.1, the AndroidManifest.xml will contain a reference to android.app.splash_screen, which was removed from the application template when the splash screen functionality was fixed by 4d08d80be60af14c5daed7c6f8d37538aea6c429. To make sure existing apps still compile, we put back a dummy splash.xml so that the reference in existing manifests still work. If this splash screen was actually used for something, it will no longer show up, so we also need to document that people should update their AndroidManifest.xml to the new system, but we can't inform people via mysterious compilation failures :) Task-number: QTBUG-37493 Change-Id: I6289f9b5e2c315fa6db502cbde27bd18e15f1f8d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Try to hide the sw keyboard on finishComposingText.BogDan Vatra2014-03-201-1/+1
| | | | | | | | | finishComposingText is called when the composing text is finished also when the sw keyboard is hidden. Task-number: QTBUG-37631 Change-Id: I4f4e90e60ac3f89784755b591f578e07fdbfdd2a Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* 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>