summaryrefslogtreecommitdiffstats
path: root/src/android/jar/src
Commit message (Collapse)AuthorAgeFilesLines
* Android: guard getStateCount() with correct VERSION.SDK_INTAssam Boudjelthia2021-08-231-1/+7
| | | | | | | | | | The call getStateCount() was introduced in 29, so cases for lower API should be handled. Change-Id: I7f58541c0b16fed91835e6f390afa89378a7af3e Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit 760e24e8676d52e2851ef8556770194a97eae831) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix Style java code format and warningsAssam Boudjelthia2021-08-171-509/+344
| | | | | | | | | | | The code had many bad formating and syntax or API usage warnings, as well as some unused methods or classes which are fixed with this patch. Task-number: QTBUG-71590 Change-Id: Ib113a0dc05703afb5190ec880b27daf75274cb1e Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit dc9075554135160bb07aa54708aba69d127160e2)
* Fix hidden API access for Android styleAssam Boudjelthia2021-08-131-832/+786
| | | | | | | | | | | | | | | | | | | | Use public API and attributes to retrieve part of the Android style values instead of using reflection to access hidden or private fields. This latter method, was throwing lots of warnings or exceptions at the start of apps making it big annoyance to deal with. This patch doesn't handle drawables though, so the "full" and "default" Android style will be somehow broken still for now. For that reason, the default style extraction method is set to minimal to avoid getting warnings about it, and Fusion style could be used for Widgets apps, and for QML apps, it's recommended to use the Material style from Quick Controls 2. Task-number: QTBUG-71590 Change-Id: If87895dc66751e23c9f4ea840e9f3e611aaa8833 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit b5b9c264ddff6c6eebb08038d9d3f2282df5c0ec)
* Android: Fix unnecessary clipboard data accessMike Achtelik2021-07-161-12/+7
| | | | | | | | | | | | | | Android 12 introduced a notification which is shown to the user each time the app accesses the clipboard via getPrimaryClip. Currently this notification is triggered, even if we just want to check, if some clipboard data exists. So lets not get the actual data and instead use getPrimaryClipDescription to check for the existence of the correct mime type in the clipboard. Change-Id: I4800f5545ab46b7f6cade0ce9d78c04b50ae96cf Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 5a7f4c1f4964a4bf6595002478fbcd474cedd8a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Reset m_usePrimaryClip when clearing the clip dataAndy Shaw2021-05-191-0/+1
| | | | | | | | | | | | The variable needs to be set to false when we clear the clip data as there is no primary clip anymore so we should not try to access it when setting new data. Fixes: QTBUG-93831 Change-Id: I309270dc075fcb0457607561ee23e12f7eb6397f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 96982bab0c5ff855100c1dcde23d090348be53db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix Application becomes unresponsive issuePekka Gehör2021-05-032-2/+13
| | | | | | | | | | Block key events until the plugin is running. Fixes: QTBUG-67944 Change-Id: Iea47f2e94d850141834a7e8fc26218be2cacf660 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 2262a9cd2d135d5ea2ade42460496c88d8b2c292) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: replace stacktrace with debug message in search for setServiceLars Schmertmann2021-02-181-2/+6
| | | | | | | | | | | | | | | Don't print stacktrace when setService is not found but only print a debug message, QtServiceDelegate will continue to look for setContext which might actually be a problem if not implemented. 950e628fd842f22ac741b18440fcc99213820587 did this change for QtActivityDelegate. Fixes: QTBUG-86733 Change-Id: I8f2c6494da9133a3e9dedaabbe5fc931732d0d72 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 15572f9efeb1b7dd609b55f8981eb5b5dc3d3db9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix the input type for date/timeChristian Strømme2021-02-081-1/+1
| | | | | | | | | | | The default variation of the DATETIME class is to show the layout for date and time. If either date or time is requested, then only set one of them. Change-Id: I5178f5f80490b7b0d7e7011d11da402a316d164a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 86e10e1acd34ae4463bb2b0c24b8bdab71c6ade4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Replace magic number for TYPE_NUMBER_VARIATION_PASSWORDChristian Strømme2021-02-021-1/+1
| | | | | | | | | This field has been defined since API level 11, so no reason why we shouldn't just use that instead. Pick-to: 6.0 Change-Id: I8e3ffde3680e41f26d776e1f0474f632186a6b27 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Fix input method hints for ImhHiddenTextChristian Strømme2021-02-021-15/+9
| | | | | | | | | | | | | | | | | | | If ImhHiddenText is set then that should take precedence over the other input method hints. Also, certain combinations aren't really possible. E.g., ImhEmailCharactersOnly and ImhHiddenText doesn't have its own specific variation on Android. ImhSensitiveData and ImhNoPredictiveText are also likely to not work as TYPE_TEXT_FLAG_NO_SUGGESTIONS is normally ignored by Android keyboards. A common workaround is to use the visible password variation but since this will force the layout to use latin characters it's not something we can use as an universal workaround, so users will need to manually enable it through the environment variable QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT Fixes: QTBUG-85787 Pick-to: 6.0 5.15 Change-Id: I0ff591ec9acf8dd556c7987e6d997cff3ddfe38e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Finish composing text before Key handlingBartlomiej Moskal2021-01-191-0/+11
| | | | | | | | | | | | If the sendKeyEvent was invoked, it means that the button not related with composing text was used. In such case composing text (if it exists) should be immediately finished. Fixes: QTBUG-85715 Pick-to: 5.15 6.0 Change-Id: Ifbca067805b8d20f6a90f95b27210595abed964a Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Fix for accessibility potential crashPiotr Mikolajczyk2020-12-181-0/+2
| | | | | | | | | When accessibility was not active it was possible to force its update, causing a null pointer exception in java. Pick-to: 6.0 5.15 Change-Id: I60f65612d6e9f712ba3c591ffcc6803f06f09efb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Qml accessibility fixesPiotr Mikolajczyk2020-12-083-5/+78
| | | | | | | | | | | | | | | | | | - Accessibility focus can follow the position of the widget (for example when swiping on a scrollview) - controls are clickable directly after appearing on the screen after scroll (previously you had to click somewhere else on the screen, and after that you could focus the newly appeared control) - checkbox and switch react correctly on click action - fixed combobox behavior with accessibility enabled Task-number: QTBUG-79611 Pick-to: 6.0 5.15 Change-Id: If36914ab0165f33593e68fd7ecf168693f8538a7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: avoid reflection with ClipData addItemAssam Boudjelthia2020-12-011-22/+5
| | | | | | | | Task-number: QTBUG-81687 Pick-to: 6.0 5.15 Change-Id: If07fff6f371d2c05cb61a1a7695c96219d0260d2 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Android: Treat ACTION_CANCEL as TouchPointReleasedBartlomiej Moskal2020-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | If TouchPointPressed was previously send and there is no TouchPointReleased, we are exposed to uncorrectly handled touches by application. Some Android devices can recognize hand gestures. In some case the gesture may be handled by Android System. In this situation ACTION_CANCEL MotionEvent is delivered ACTION_CANCEL - from Android specification: -"Occurs when the parent takes possession of the motion, for example when the user has dragged enough across a list view that it will start scrolling instead of letting you press the buttons inside of it" -"The current gesture has been aborted. You will not receive any more points in it. You should treat this as an up event, but not perform any action that you normally would" If ACTION_CANCEL appears it means that ACTION_UP will not be delivered to application. That is why ACTION_CANCEL need to be treat as TouchPointReleased event. Fixes: QTBUG-72110 Pick-to: 5.15 Change-Id: I8f32930cdb424b7530adc87b8334ac48a3bb9d57 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Don't use putIfAbsent as that is not available in older APIsAndy Shaw2020-11-021-2/+2
| | | | | | | Fixes: QTBUG-88076 Change-Id: I1ab12c574be036babfd0e4aacb44d1f75c66f4ad Pick-to: 5.15 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: replace stacktrace with debug message in search for setActivityAssam Boudjelthia2020-10-291-2/+4
| | | | | | | | | | | | Don't print stacktrace when setActivity is not found but only print a debug message, QtActivityDelegate will continue to look for setContext which might actually be a problem if not implemented. Fixes: QTBUG-86733 Pick-to: 5.15.2 Change-Id: Iaf7f347ae04605a1f616f24d25cac4938c1640a4 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Fix QSaveFile always failing on content: URLsVolker Krause2020-10-231-0/+5
| | | | | | | | QSaveFile needs QFileInfo::isWritable() to work, which 7e5f38aec667 caused to always return false for content: URLs. Change-Id: If839331e4bd176765ed242791cb253c2064f5f6d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: rename Android's package name for Qt 6Assam Boudjelthia2020-10-0316-18/+18
| | | | | | | | | | Rename Android package name org.qtproject.qt5.android to org.qtproject.qt.android to avoid inconsistency with Qt 6 name. Also, we include the major version number in the jar target. Task-number: QTBUG-86969 Change-Id: Ibb68947289be1079911b34ea157bf089cc52c47f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Pass the parsed URI if it fails to get permission on 23 or lessAndy Shaw2020-09-111-0/+4
| | | | | | | | | | | In Android API level 23 or lower it will still be able to open the file even if the permissions are not provided. If the system is not going to allow it then it will prevent it later on. So we trust the system to block access if need be. Pick-to: 5.15 Change-Id: If663e3cf0a10818931577988abdc0fb8ec2650db Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Use ApplicationInfo to get metaDataMike Achtelik2020-08-281-5/+5
| | | | | | | | | Since the load*Libraries functions might also be invoked when using an android service, where no activity is present, we can't rely on the activity to get the metaData. Pick-to: 5.15 Change-Id: I493c68591dbcfbe3063971cfd9ab384df71d03d7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Add support for travesing directories and accessing filesAndy Shaw2020-08-071-6/+103
| | | | | | | | | | | | | | | | | | | This enables QDir and QFileInfo/QFile to work with entries found from a entryList() as it will obtain the permission for these files correctly when it is encountered. Due to what seems to be a quirk in the Android API, we cache whenever we come across a known directory to save time later on for checking if it is a directory. All uris accessed where we get permissions for are cached so we get the right URI for that given content url as some are granted via the Intent. Fixes: QTBUG-85538 Fixes: QTBUG-83041 Fixes: QTBUG-76886 Pick-to: 5.15 Change-Id: I685b3c60804812a0e4b85fbdbb4ec5efaa09420c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: add missing printStackTrace() in catch statementsAssam Boudjelthia2020-07-143-3/+20
| | | | | | Pick-to: 5.15 Change-Id: Id50743113fcdd450932111cfe1a563276f152bb1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Android: check for debug mode before fetching extraappparamsAssam Boudjelthia2020-07-081-6/+6
| | | | | | | | | | | | | | | In pre Qt 5.14, the assets folder used to have the file "--Added-by-androiddeployqt--/debugger.command", that indicate debug mode, however, in Qt 5.14+ the assets are compressed into one file, so this current check is obsolete. Qt Creator uses extraappparams to pass QML debugger args, without it the debugger won't start. Pick-to: 5.15 Task-number: QTCREATORBUG-24155 Change-Id: Ib3037f4dc8c55af6932d598c6491a046efe13033 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: fix QDesktopServices::openUrl() error for file scheme pathAssam Boudjelthia2020-06-261-3/+5
| | | | | | | | | | | If the url is a "file:" scheme url don't check for permissions which the file won't have, and then disable StrictMode for API >= 24 to be able to pass the "file:" path to the openUrl intent. Pick-to: 5.15 Fixes: QTBUG-67877 Change-Id: Ia3fecc24a67069dc76f866455277bf8b929e7697 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Android: Don't pause when in multi window modeAndy Shaw2020-06-251-1/+2
| | | | | | | | | | When the application is in multi window mode then when pausing it should not suspend the application as it can still be visible in the background. Change-Id: I03a561459b2aa04c808b7d4220cd3e558671dd17 Pick-to: 5.15 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Clear the clipboard when getting a null mimedataAndy Shaw2020-05-301-0/+2
| | | | | | | | | | From API 28 it is possible to clear the clipboard so we should ensure that this is done if API 28 or later is being used. Otherwise it is not removed, but that is due to limitations on the Android side. Pick-to: 5.15 Change-Id: I1fe504d0e566c6923b39b2adf4540619c6b1daf7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-051-0/+5
|\ | | | | | | Change-Id: I003c0d6271c6444748bf30b4331eca3fb2410f44
| * Android: fix mimeTypes handling for file dialogAssam Boudjelthia2020-05-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Android native file manager supports mimeTypes, I use QMimeDatabase to get the correct mime type for the nameFilter used with the file dialog. [ChangeLog][Android] Support setting mimetypes and and namefilters for Android native file dialog. Task-number: QTBUG-83089 Change-Id: I46545576dc9b51aa872bb37dbf4fe12b2533bdd9 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-221-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
| * Android: Only check for uri permissions when it is a file or contentAndy Shaw2020-04-141-1/+6
| | | | | | | | | | | | | | | | | | | | This amends f36b042e2b66a3ad32980b21e9fafc1bd9b0c7c1 to only check permissions for uris that are going to be local to the device itself. Other uris, such as http, https etc, should go through fine without a check. Change-Id: If05caadb6e0712d9db8f57185ef017d724d9e172 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: Implement MaximizeUsingFullscreenGeometryHintEskil Abrahamsen Blomfeldt2020-03-304-42/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This reintroduces c17a5cec1901dd23f4c39ec2ae47a060fbb06895, which was reverted in Qt 5 because it requires API level 23.) This flag tells the app to use as much of the screen as possible while still keeping system UI visible, and can be supported on Android by using translucent system UI, similar to iOS. What this does: 1. It changes the current fullscreen/not-fullscreen logic to allow three states: fullscreen, fullscreen with translucent decorations and not-fullscreen. 2. In order for it to work, we have to send the actual screen geometry and available geometry, at least in the case where the user needs to know the available geometry to know the safe area of the window. So we get the real screen metrics and pass these to the QPA plugin (API level 17, so we can do that now that the minimum version is 21.) 3. Note that getting the insets and calculating the useable area does not work for non-fullscreen windows, since Android is quite inconsistent in this respect. So in this case we just use the window size and origin of 0,0 for the available geometry. 4. Since we are touching this code anyway, this patch also tries to use more consistent wording (calling it "available geometry" everywhere instead of desktop geometry in some places and just geometry in others, etc.) [ChangeLog][Android] Qt::MaximizeUsingFullscreenGeometryHint window flag is now supported, and will make the window fullscreen, but keep the system UI on-screen, with a translucent background color. Fixes: QTBUG-74202 Change-Id: I4cc5ef9cc2a3bd22d4d8d2bb767c6ff8a3aa75c0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Android: Increase minimum API level to Android-23 / Android 6Eskil Abrahamsen Blomfeldt2020-03-042-12/+5
|/ | | | | | | | | | | | There are certain APIs we need which cannot be used without this, and in general it simplifies some code. [ChangeLog][Android] Minimum Android version is now Android 6.0, API level 23. Change-Id: I72ca3b429bf48969e16e2bc6b99d9c4af993ea77 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: Add support for getting information about content urisAndy Shaw2020-02-281-0/+57
| | | | | | | | | | | This enables things like size(), exists() to work with Android content uris with the provided uri given from a filedialog. It is expected that it is always a full path due to the nature of content uris, so relative paths will not work. Change-Id: I9c9ea42833677eb9d937b33e9dd42ee2a7d9c7c5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: handle check permissions before any file operationsAssam Boudjelthia2020-02-171-12/+59
| | | | | | | | | This is required because opening a Uri with no permissions can cause crashes. Some exceptions were not handled at all. Change-Id: I2e8f9505879b9fc4c1c47bdfa1bf173b39ada3ea Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Handle exceptions when accessing android clipboardMike Achtelik2020-01-311-50/+78
| | | | | | | | | In some circumstances android throws an exception or returns null, when trying to access the clipboard. Fixes: QTBUG-80689 Change-Id: I92c134e2a002fc648ff966e15a19eb3307c428a1 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: rework assets supportBogDan Vatra2019-10-021-0/+19
| | | | | | | The new version fix QDirIterators and it lists all the files and dirs. Change-Id: I5a30eedb61ab2397a84365d00f308cda0c194de2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* [androidcontentfileengine] Catch SecurityException during file openingNicolas Fella2019-07-051-0/+3
| | | | | | | | | resolver.openFileDescriptor throws a SecurityException when the caller doesn't have sufficient permissions to access the URL. This will make an application crash. We should handle this case gracefully and report it to the user. I'm unsure if there is a better way to do this than simply logging the exception. Change-Id: I36bfbd3e398c8176e57042a27740aa15bce63a7c Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-121-1/+4
|\ | | | | | | Change-Id: I0c00ffe0eabebc919f22d6faa4bf958b288e8fd9
| * Android: Fix wrong height of text editor context menu in some localesVova Mshanetskiy2019-05-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combined width of all four buttons (cut, copy, paste, select all) is greater than width of the screen in some locales and/or on some devices. This was causing width of the last button to be set to zero and height of the whole popup to grow too much due to word wrapping in the last button. The context menu used to look something like this then: Cut Copy Paste S e l e c t a l l This commit disables word wrapping and enables text ellipsizing for button labels. This fixes height of the popup. In the long term though Qt will probably have to implement an overflow button like in Android's built context menu. The linked bug report contains before and after screenshots. Fixes: QTBUG-72933 Change-Id: I8e270dbf8ca66f99748cdc531a77e11a5ab11c2b Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-023-21/+35
|\| | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
| * Android: Fix positioning of text editor context menuVova Mshanetskiy2019-05-012-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code in QtActivityDelegate.updateHandles() and EditPopupMenu.setPosition() could use size of EditPopupMenu.m_view to calculate position of context menu before that size was calculated during an asynchronous layout pass. In particular m_view reports size 0x0 when context menu is opened for the first time after start of the application. In this case the context menu was displayed on top of the text editor instead of being displayed above it. This patch fixes that problem by moving all positioning code from QtActivityDelegate.updateHandles() to EditPopupMenu.setPosition() and adding an OnLayoutChangeListener which calls setPosition() again each time the size of m_view changes, including when it changes for the first time from 0x0 to a real value. Change-Id: I670fef811a4dcba5524f7520ea41a47978dd10f1 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * Android: Fix positioning of selection handles in text editorsVova Mshanetskiy2019-05-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code used size of m_cursorView to calculate position of the cursor handle popup. But since on Android layout process is asynchronous, both width and height of m_cursorView was 0 upon first call to setPosition(). This resulted in selection handles being initially displayed at a wrong position for a fraction of second and then quickly moving to the correct position. In some cases handles stayed at the wrong position until touched by user. This patch replaces use of m_cursorView's size with use of m_popup's size. Width and height of m_popup may be used immediately because they are explicitly assigned in initOverlay(). The size of m_popup should be always equal to the would-be size of m_cursorView because of how it is calculated. Change-Id: I9868c9a5ce0103d8328b2478cf82feaceba7f404 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-211-3/+10
|\| | | | | | | Change-Id: Ie7f68dcd5650e0037b6c3313cc9ffdcd7c494fbe
| * Android: Support for separate landscape/portrait splash screensEskil Abrahamsen Blomfeldt2019-03-201-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To get appropriate aspect ratios for the splash screen, you usually need separate drawables for the portrait and landscape versions. We support this by adding two new meta data entries that can be used. If they are not available, we will fall back to the generic one, so we are still compatible with existing AndroidManifest.xmls. [ChangeLog][Android] Added entries in the AndroidManifest.xml for specific portrait and landscape splash screens. If one is present for the current orientation, it will be preferred over the generic one. Task-number: QTBUG-74029 Change-Id: I5ffea56320aef85f62f21a59df4d077b4163a65a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Android: Use DisplayListener to detect rotationVal Doroshchuk2019-03-061-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Activity's onConfigurationChanged is not called when rotating from landscape to landscape (through 180 degrees), added display listener to detect the rotation. DisplayManager.DisplayListener.onDisplayChanged() is called exactly when Display.getRotation() value is changed. Task-number: QTBUG-56919 Change-Id: Iabf376adf0a0756dddacaece62e5a2ac604ea947 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-021-1/+3
|\| | | | | | | Change-Id: I83f6ed9480bf21020ce7a9431010d87a88df84a1
| * Android: Show correct keyboard when using Gboard and Japanese layoutAndy Shaw2019-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 71a63836ed5d21feacbfcdbfdbd4b405f635282f a workaround for Samsung devices using ImhNoPredictiveText was included as there is a bug on those devices. However this causes a problem with other keyboards such as Gboard when using languages such as Japanese, as it would not show the right keyboard at all and only showed a qwerty one in those cases. Therefore we default to not working around the issue as it is more of a problem to not allow certain keyboard layouts as opposed to having predictive text even if it is turned off. For those who want to disable predictive text and as such have the consequences of not showing some keyboard layouts, they can set the QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT environment variable. [ChangeLog][Platform Specific Changes][Android] Text fields with ImhNoPredictiveText set are no longer working around keyboards that disregard this setting. To enforce the workaround then the environment variable - QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT should be set. Change-Id: I9ace7ba96ebad68987b53783e25067b66c002f25 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-213-45/+51
|\| | | | | | | Change-Id: I830beea26863323ab78a5d4b093f7763d77ad3da
| * Load main library as soon as possibleBogDan Vatra2019-02-193-45/+51
| | | | | | | | | | | | | | | | | | Delaying the main library load cause serious problems for people who want to access it's functions from java before the main method is called. Change-Id: I87f3a8282003395e003b06978048762eeabe6548 Fixes: QTBUG-68813 Reviewed-by: Andy Shaw <andy.shaw@qt.io>