summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/src
Commit message (Collapse)AuthorAgeFilesLines
* Support multiple native surfaces on Android.BogDan Vatra2014-01-1751-7670/+0
| | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-031-1/+1
|\ | | | | | | Change-Id: Id13badc270db98806048753fd7fb658aa17f1ede
| * Android: Don't show ActionBar at startup.BogDan Vatra2014-01-021-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-35151 Change-Id: Ie62e50032aaa647a86c4f03b1a3363e5ef6a1bbb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Extend multimedia keysAllan Sandfeld Jensen2014-01-021-0/+9
|/ | | | | | | | | Extends the Qt keycodes with four missing keys, common on remote controls: Guide, Info, Settings and Exit. Change-Id: I6789f13dbb662da4261a3c947757644e12306dd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: use binary name when using loadClass.BogDan Vatra2013-12-052-3/+3
| | | | | | | | QtAndroid::findClass uses loadClass methods to find Qt's java classes. The documentation says that we should use a binary name. Change-Id: I2146789235435b7052827cde58b7719b7d62dc1d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Use case insensitive comparison when checking platform plugin keys.Friedemann Kleint2013-12-031-1/+1
| | | | | | Change-Id: Iff44698dcc941ca244b476f0e6c6a993f2ad75f3 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-264-2/+13
|\ | | | | | | Change-Id: I83ff8f4d7dffd7385013a1bd8a1732a89ee20d56
| * Android: make the default font size biggerPaul Olav Tvete2013-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | The default font size turned out to be slightly too small for comfort on touch devices. This tweaks the size from a 12-point equivalent to a 14-point equivalent. (Point sizes aren't real point sizes because of compatibility with iOS.) Change-Id: I6d970fdd5bba8199cabdf1aaaaac10d19c53c654 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Don't send ApplicationStateChanged, if platformIntegration is not set.BogDan Vatra2013-11-211-1/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-34868 Change-Id: Ia86877550884a3037b9ddedf5d8e227ec1ead2d6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Allow platform to decide default behavior for show() based on window flagsTor Arne Vestbø2013-11-202-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ShowIsMaximized and ShowIsFullscreen style hints were not granular enough to build a default behavior from that would be correct for all platforms. The recent Android patch that excluded dialogs from being shown maximized (Ia249e93dbbea1) has now been moved into a platform override in the Android integration plugin, leaving other platforms to the default behavior of using the style-hints. We still special case popup-windows though, as that behavior has been there for a while. Task-number: QTBUG-34969 Change-Id: Id36346d71bfc46171383ffe334592ca0b94e456f Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-201-38/+19
|\| | | | | | | | | | | | | Conflicts: configure Change-Id: I0d31f23483ea67c4cac5af16014366e1ba5ac093
| * Android: Remove usage of QObject::tr()Friedemann Kleint2013-11-191-38/+19
| | | | | | | | | | | | Change-Id: I948d9fc36aa52d2d247a84b5d9b2cf949b93387d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Remove empty QAccessible2 headerFrederik Gladhorn2013-11-201-1/+1
|/ | | | | Change-Id: Ia5e9b1adf9280e6b7d7aaf8cb5b5167b694a6070 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Android: Support popup menusEskil Abrahamsen Blomfeldt2013-11-152-1/+10
| | | | | | | | This is used by QML comboboxes, menu buttons, etc. Task-number: QTBUG-31420 Change-Id: I6d3f32fd80ce91c4be34eae636d1b95a4e251a49 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: work around input method cursor position bugPaul Olav Tvete2013-11-141-0/+20
| | | | | | | | | | | | | | Since the Qt input method queries only give us information on the position within the block, moving to the same position in a different block will be interpreted as not moving. The quick fix is to send a fake position before the real one in this case. Task-number: QTBUG-34845 Change-Id: I5d62bdffc283e41d0384c60a0b69c01811caa629 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Initialize mWindowStateBogDan Vatra2013-11-142-8/+3
| | | | | | | | | Use the same variable in QAndroidPlatformWindow. Task-number: QTBUG-34764 Change-Id: Idf33707e81cf7306663196f3c17735d8dc1dde5d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: fix crash on exitPaul Olav Tvete2013-11-141-1/+1
| | | | | | | | Let's not try to dereference the null pointer. Task-number: QTBUG-34746 Change-Id: Iee79b711bd81614e36af4ab3612f9a87053a39f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android native message dialogBogDan Vatra2013-11-096-1/+326
| | | | | Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Fix menu on API-11+BogDan Vatra2013-11-063-12/+18
| | | | | | | | | | | 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>
* Add better version checks for accessibilityFrederik Gladhorn2013-11-051-1/+16
| | | | | | | | | | | 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: Differ between ShowMaximized and ShowFullScreenEskil Abrahamsen Blomfeldt2013-11-0111-5/+250
| | | | | | | | | | | | The default is now ShowMaximized which behaves as it did before, i.e. each window will fill the screen but the status bar will be visible. Calling showFullScreen() explicitly will now hide the status bar to maximize the amount of screen real estate occupied by the application. Task-number: QTBUG-33135 Change-Id: If0d0a2ab72f8026e76818290e2b953dbc0dec156 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Check for null pointer before calling ANativeWindow_release()Christian Strømme2013-11-011-1/+2
| | | | | | | | | | Calling ANativeWindow_release() with a null pointer will cause a SIGSEGV. Task-number: QTBUG-33955 Change-Id: If7d1afa3baea04360507eec5042b4e18a0272527 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: implement a simple cache mechanism for assets dirs.BogDan Vatra2013-11-012-27/+54
| | | | | | | | | AAssetManager_openDir is a pretty slow operation, so we are caching the most used dir contents. Task-number: QTBUG-34464 Change-Id: If198f7dae0d6961291c992e6eb46839ba5455819 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove unused field.BogDan Vatra2013-11-011-7/+0
| | | | | | | Fix crash on Android 4.4 Change-Id: Ibee584c0154b0b116af58477302e7e8385f0290d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Handle virtual keyboard visibility changes.BogDan Vatra2013-11-013-2/+35
| | | | | | | | | emitInputPanelVisibleChanged when virtual keyboard visibility is changed. Task-number: QTBUG-34347 Change-Id: Iab7374db42ff8ce6f33dcc793b23f84d3c8692d5 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Don't rely on QIcon::isNull() to validate icon data.Christian Strømme2013-10-301-4/+6
| | | | | | | | | | | QIcon::isNull() only checks if it has a valid d pointer and not if it actually contains any image data. The result is that the QImage create from the icon would be invalid, and later cause an exception to be thrown. To avoid this we should check the QImage as well. Task-number: QTBUG-34416 Change-Id: I9dd0a2387d73bfc2c27ceb9df247ddc186dd659f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Re-enable NonFullScreenWindows on AndroidEskil Abrahamsen Blomfeldt2013-10-291-1/+0
| | | | | | | | | | | | This flag was created because the eglfs plugin did not support non-fullscreen raster windows. Now that it does, we can remove it again. Turns out this also fixes several issues with positioning and sizing of dialogs due to bugs in the implementation of the flag. Task-number: QTBUG-33846, QTBUG-33499, QTBUG-32537, QTBUG-32297, QTBUG-31457 Change-Id: I3902ae57d49d77e3c1046ec57b6f6926f70ec6a4 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Don't crash if the screen is not yet initialized.BogDan Vatra2013-10-281-2/+4
| | | | | Change-Id: I4751c2dec5780f42b348a8a8ea628f65d548dcec Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix repaint on rotationEskil Abrahamsen Blomfeldt2013-10-255-15/+10
| | | | | | | | | | | | | After f89f099c55576992b39a8021aace64ff32747624, we no longer post a geometry-change and expose event when calling setGeometry, which the Android plugin depended on. This caused the window to stay the same size when it was resized by orientation changes. We put back the events in the code that calls setGeometry() instead. Task-number: QTBUG-32878 Change-Id: I449515dda07c839e0991c5a7031a972ca9c74dff Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Don't crash if the platform plugin is not initializedBogDan Vatra2013-10-231-0/+3
| | | | | Change-Id: I999411816192edbd2bf40c6bda92d6e94fb3d1b0 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Make platform menu more robustPaul Olav Tvete2013-10-231-3/+5
| | | | | | | | | Don't crash and lock up the whole device when people try to remove menu items that don't exist. Task-number: QTBUG-34246 Change-Id: I4396d252c5af93e021c9e218dbab7c0e7f190d9d Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Accessibilty: Handle text betterFrederik Gladhorn2013-10-201-3/+15
| | | | | | | | Try harder to actually return text, before TalkBack would not read the contents of line edits and other text widgets. Change-Id: Ibb9bb8ac4a2728674f6f5ccf29eda5ed66a81a34 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Remove unused includeBogDan Vatra2013-10-161-1/+0
| | | | | Change-Id: I77bd22b3e0314686450343c5a52914d7f97298d3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: don't set autorepeat to true by defaultPaul Olav Tvete2013-10-161-2/+2
| | | | | | | | | | When we don't know if a key event is caused by autorepeat, then the safest assumption is that it is not. Task-number: QTBUG-30793 Change-Id: Iea6aba164e299f0f2c772547b45df6a49639b7e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Make it possible to pass arguments via intent extrasEskil Abrahamsen Blomfeldt2013-10-161-5/+2
| | | | | | | | | | | | | | | 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>
* Update keycode mappings of multimedia keysAllan Sandfeld Jensen2013-10-151-6/+44
| | | | | | | Updates keycode mappings for evdev, directfb and android. Change-Id: I6789f13dbb662da4261a3c947757644e12306dd9 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix backspace bug with 4.3 stock keyboardPaul Olav Tvete2013-10-092-3/+111
| | | | | | | | | | 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>
* QPA: Fix semantics of GUI event dispatcher ownership in platform pluginsTor Arne Vestbø2013-09-302-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformIntegration::guiThreadEventDispatcher() function acted as an accessor to event dispatchers created in the constructor of each platform plugin, but the logic and semantics of event-dispatcher handling in Qt itself (QCoreApplication/QGuiApplication) still assumed both ownership and control over the event dispatcher, such as when to create one, which one to create, and when to delete it. This conflicted with the explicit calls in the platform plugins to QGuiApplication::setEventDispatcher(), as well as left a possibility that the event-dispatcher created by the platform plugin would never be deleted, as none of the platform plugins actually took full ownership of the dispatcher and deleted it in its destructor. The integration function has now been renamed back to its old name, createEventDispatcher(), and acts as a factory function, leaving the logic and lifetime of event dispatcher to QtCoreApplication. The only platform left with creating the event-dispatcher in the constructor is QNX, where other parts of the platform relies on having an event-dispatcher before their initialization. We then need to manually take care of the ownership transfer, so that the event-dispatcher is still destroyed at some point. Change-Id: I113db97d2545ebda39ebdefa865e488d2ce9368b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: remove environment variable warnings at app startup.Yoann Lopes2013-09-251-1/+1
| | | | | Change-Id: I8542809fd16465a29b4fb7e8276b63d71e1b9c0e Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Use the new QJNI api in our QLocale implementation.Christian Strømme2013-09-201-11/+9
| | | | | | | This change makes use of the private QJNI api that now exists in QtCore. Change-Id: Id03664942d6c6cbfec028a3b52729057153a8466 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix android after Eglfs binary compatibility breakPaul Olav Tvete2013-09-201-2/+3
| | | | | Change-Id: I95d98b475188b43f1e0946c7ad6fd2388839d619 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Android: handle inverted orientationsPaul Olav Tvete2013-09-206-11/+69
| | | | | | | | | | 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: Make font size compatible with Qt for iOSPaul Olav Tvete2013-09-123-2/+7
| | | | | | | | | | | | We recommend using pixel sizes for predictable results. For those who use point sizes in their UIs, we will now give them results that look similar to what we do on iOS. The default font is changed to give the same size as before this change. Task-number: QTBUG-32096 Change-Id: Ia25506ba721a39d31340f3df8bc14129e507af14 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-104-21/+43
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-074-21/+43
| |\ | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-08-284-21/+43
| | |\ | | | | | | | | | | | | Change-Id: I815757e33b6c0b1e702c8e386e8e30307f78e318
| | | * Android: Fix orientation change on Android 4.3Eskil Abrahamsen Blomfeldt2013-08-194-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Android 4.3, we will get a new native window pointer for the same surface (the old surface has not been destroyed), whereas before we would get the same pointer, thus hitting the "sameNativeWindow" branch. This revealed some bugs in the surfaceChanged code path when the old surface had not been destroyed. This path is now taken both when there's no old surface (the app has been suspended in the mean time) and when the orientation changes. To handle the second case, we need to make sure: 1. We update the static pointer 2. We update the pointers in the platform windows 3. We don't add a second reference to the static data for windows 4. We schedule an update of the window size Task-number: QTBUG-32878 Change-Id: I47257615f9ba820315fc98d7a804e52223f430bf Reviewed-by: Christian Stromme <christian.stromme@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | | Fix Android Style plugin.BogDan Vatra2013-09-104-4/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix unused variable/argument warningsEskil Abrahamsen Blomfeldt2013-09-092-14/+2
|/ / / | | | | | | | | | | | | | | | | | | There were a bunch of these in Android specific code. Change-Id: Icf6cda40302171810c1b559f9d442fba6444a3a5 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-021-1/+0
|\ \ \ | | | | | | | | | | | | refs/staging/dev