summaryrefslogtreecommitdiffstats
path: root/src/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: set allowNativeHeapPointerTagging to false in the manifestv6.2.1Assam Boudjelthia2021-10-201-1/+2
| | | | | | | | | | | | | | | Android 11 enables pointer tagging by default on arm64 systems [1], which can cause QML to get invalid data, which caused the color issue (and most likely other issues). [1] https://source.android.com/devices/tech/debug/tagged-pointers Pick-to: 6.2 dev 5.15 Fixes: QTBUG-97009 Task-number: QTBUG-91150 Change-Id: Ic4f145bba3345b3bee5445685f03269e3785f514 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: Update and add missing gradle files for jar foldersAssam Boudjelthia2021-10-061-7/+6
| | | | | | | | | | | | | Update the build.gradle for main Qt jar code, and add same files for network and network information backend, so the code can be managed from Android Studio. This also adds .gitignore to ignore Android Studio build artefacts. Change-Id: Ic06e9d12708070fad112f17e58b8754608d184f3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b02d88e416769857e56f310cdad7348767304b59) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: use gradle repo mavenCentral() instead of jcenter()Assam Boudjelthia2021-10-061-2/+2
| | | | | | | | | | | | jcenter() is deprecated and will be shutdown by next year [1], thus the replacement mavenCentral() could be used instead. [1] https://blog.gradle.org/jcenter-shutdown Change-Id: Ic9d1c15d657f23712ee4c866d5c1a45706353429 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 3dbca82f861c8c83eea32560d5e63e1c71057d3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: remove comments from the manifest fileAssam Boudjelthia2021-10-021-44/+6
| | | | | | | | | | | | The comments are not needed, since we're adding a docs page for the manifest, which include the information from these comments and more. Keep the manifest clean. Task-number: QTBUG-95285 Change-Id: I1fd8bc695f5aab1bcc69f549cb3ddeeaac168b98 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit a1e7c441de16cb4e8d6bdac39160759116ecd233) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Specify Android architecture in gradle filesAndreas Buhr2021-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | When building for armeabi-v7a, building and APK using "ninja foo_make_apk" works. Building it by calling "gradlew assembleDebug" works. Opening the "android-build" folder in Android Studio and clicking the "Build" button works. But clicking the "Run" or "Debug" button in Android Studio does not work when the attached phone is arm64-v8a. Then Android Studio automatically selects the v8 architecture which does not find the Qt libraries. This patch adds explicit ABI selection to the gradle configuration files. With explicit ABI selection, Android Studio does not try to outsmart you. Fixes: QTBUG-96701 Task-number: QTBUG-87022 Change-Id: I4ad6356c38b7eca004c0e0dbbb357cab7de84c0f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 07cfab07a2a489e021b56226824a2d9b1211fad7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename variable to not reference Qt5Andreas Buhr2021-09-301-4/+4
| | | | | | | | | | In the Android gradle files, the variable qt5AndroidDir refers to Qt5 and might confuse users. This patch renames to qtAndroidDir. Change-Id: Ib18a3cd2c38646e4c6c0435dae9234f0f7887eb5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 95ef19371577e1646bd232763928e6ddf80d753f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add error messages in case system library directory does not existAndreas Buhr2021-09-301-2/+10
| | | | | | | | | | | | | | On Android, when the system library directory does not exist, no error message was given. This led in turn to error messages like Can't find 'nulllibQt6Core_armeabi-v7a.so' which are not very helpful. Task-number: QTBUG-80766 Task-number: QTBUG-96701 Change-Id: I4187e4a68d9e78e198152306a3e664c30c51ab18 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 44c8ae5543594011ab0d88ca784574c01312c68e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Add information about who launched this activity to intentsLars Schmertmann2021-08-261-0/+18
| | | | | | | | | | | | * With this change, applications can easily determine the source of an intent without creating an own extension of QtActivity. * https://developer.android.com/reference/android/app/Activity#getReferrer() Task-number: QTBUG-84382 Change-Id: I6a5200af1d997640f02e2b934343914fb5f32ccc Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 0755eba5e8129ea536370c927ad9b0d034950a69) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix access to content: URLs with transient read/write permissionsVolker Krause2021-08-231-17/+21
| | | | | | | | | | | | | | | | | The current code assumed that the lack of persistent permissions means we cannot access the file at all. That however isn't the case for content: URLs we get e.g. via Intents, those are accessible perfectly fine via QFile, we just don't have (and can't obtain) persistent permissions for them. This is done by continuing in the case of not having persistent permissions and checking for SecurityExceptions that are thrown when accessing content: URLs we really have no permission for. Change-Id: I39115a7730d717eb9517e4f1c1a57e40988001a5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit ec497d5e6587ac247a326fb9a0a11c37bb197786) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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-151-506/+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) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix hidden API access for Android styleAssam Boudjelthia2021-08-122-833/+787
| | | | | | | | | | | | | | | | | | | | | 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) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add Android service check on quit appFabio Falsini2021-07-271-2/+2
| | | | | | | | | | | | | | | When quitApp() delegates the quit action to runAction(), this function only checks if an activity exists. If the process is a service, rather than an activity, it has no activity, so the action is skipped and the service is not exited. Check in runAction() for a service as well as an activity. Change-Id: Iec6f0550064506a780892d3d840f7488fc894569 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 7d7f09d5561a6dec2cb20eb5b0956f11c942e2d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix unnecessary clipboard data accessMike Achtelik2021-07-151-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: Make the manifest less to scary to read and editAssam Boudjelthia2021-07-013-86/+103
| | | | | | | | | | | | | | | | | | Remove unnecessary elements from the manifest file, making it easier to manage and read. Mostly, the removed elements are more internal data that is populated by the build system and the user shouldn't have to worry or confront that. Also, use the same formatting used by Android Studio. [ChangeLog][Android] Remove some elements from the manifest file that are internal, to make it easier to deal with the manifest. Change-Id: I6a1f275b579370972c0bf022502a8fbfe7d0bfd1 Reviewed-by: BogDan Vatra <bogdan@kdab.com> (cherry picked from commit 963a31c0f4b48c3734352706fbbdae69f19b59eb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove ministro codeAssam Boudjelthia2021-07-0129-355/+1
| | | | | | | | | | | | | | | Since Ministro no longer work on recent Android versions (Android 8+), and it hasn't been maintained and the repos are not updated, the existing code is practically a dead code. [ChangeLog][Android] Remove ministro code since it's been unmaintained and not working with recent Android versions. Task-number: QTBUG-85201 Change-Id: I18d7b1e209cba3cfd04674060e9bf39aa5a5510f Reviewed-by: BogDan Vatra <bogdan@kdab.com> (cherry picked from commit af6bc5a21bbef6a5870f8e49c2cc70c53d4fa352) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unnecessary = signs from build.gradleAssam Boudjelthia2021-06-021-2/+2
| | | | | Change-Id: Ic7090ec2003b20a809f8920bae28bc9b88733cb8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Silence misleading exception print in setQtContextDelegateAssam Boudjelthia2021-06-021-3/+1
| | | | | | | | | | | | | | As I understand it, the call to getDeclaredMethod seems to be just there to check if a given method is declared under before adding it to the delegates list, and that's why the getDeclaredMethod is not returning anything, so we could treat it as a failed check and not print anything. This is an amendment to 80f7494e8a9f9a70e3b53833a098d74d8c2331d9 which added this print. Pick-to: 6.1 5.15 Change-Id: I5f69ed5b4fa655da53ac7fba20d4e07acc75607a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Android: Fix select handles misplacement on QDialogPekka Gehör2021-05-253-0/+21
| | | | | | | | | | Get select handles {Left, Right}Point from a mapToGlobal with a cursorRectangleof anchorRectangle of the selected word/text. Task-number: QTBUG-90799 Change-Id: I4fed19a1d3bb2247656b052306307e6980074405 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* 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 Pick-to: 6.1 5.15 Change-Id: I309270dc075fcb0457607561ee23e12f7eb6397f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Fix position issue of the EditPopupMenuPekka Gehör2021-05-121-2/+5
| | | | | | | | | Set y for the EditPopupMenu from the previous correct value if select handles values are zero. The SelectionHandle.bottom() is zero if selection handles have not yet been displayed on the screen. Task-number: QTBUG-71900 Change-Id: I3694a8edd4f0d8f8799dbac1217a75c375038e66 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Handle checkPermission() below api 23Assam Boudjelthia2021-05-111-7/+2
| | | | | | | | | | | | | | | | | | Although Qt 6 supports API 23+, it's still not bad to do this fix, it achieves two things: * Avoid the use of reflection when checking for permission state * It works for all api versions With this we would be sure we don't need to do a check in c++ if (androidSdkVersion < 23) return true; The platform api checks if permission is granted or not, irrelevant of the api version. Change-Id: I9766dc35bbc8347ad0d60fde54b95710c8866736 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Android: Remove NoSuchMethodException errorPekka Gehör2021-05-101-0/+5
| | | | | | | | | | CleanUp NoSuchMethodException error(QtActivity.notifyQtAndroidPluginRunning) appears on application start up. Fixes: QTBUG-93620 Pick-to: 5.15 6.1 Change-Id: Ic835e00d02af17e1b48c0ff66d82e5957c635deb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Move Android Extras as private APIs under qtbaseAssam Boudjelthia2021-05-103-0/+202
| | | | | | | | To the option to users to use some needed APIs until we make them ready as proper cross-platform public APIs. Change-Id: I53006397463331ebae8314bf8a3a019474aec617 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Remove unused functions in qjnihelpersAssam Boudjelthia2021-05-081-3/+0
| | | | | | | | * Remove setNative{Activity,Service} and runOnUiThread functions which are not used anywhere, probably left overs. Change-Id: Ic7502dfd50d8eb4a9fa7abbe540a594a3614f14b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Android: handle ImEnterKeyType flagBartlomiej Moskal2021-05-052-1/+31
| | | | | | | | | | | | | | | | | Replace KEYCODE_ENTER to KEYCODE_TAB if IME_ACTION_NEXT or IME_ACTION_PREVIOUS flag is set. Before this change any of imKeyEntryType [1] was handled as default return key. After the fix, event is changed to Tab or Backtab (if any of mentioned flag is set) [1] https://doc.qt.io/qt-5/qt.html#EnterKeyType-enum Fixes: QTBUG-61652 Pick-to: 5.15 Change-Id: Ia27aa308fdae75bc17d1e892d17048c5afa3e2cb Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: Fix Application becomes unresponsive issuePekka Gehör2021-05-032-2/+13
| | | | | | | | | Block key events until the plugin is running. Fixes: QTBUG-67944 Pick-to: 5.15 6.1 Change-Id: Iea47f2e94d850141834a7e8fc26218be2cacf660 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Remove NoSuchMethodException errorBartlomiej Moskal2021-04-271-0/+5
| | | | | | | | | | | CleanUp NoSuchMethodException error appears on application start up. Error appears after commit: e402e1103b874c0bf91a1bc754752ee73ffadf33 Fixes: QTBUG-92885 Change-Id: Idd4d09e51c8c721ad18f9bd396c990b51cd730e7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Bump gradle (plugin) versionsMike Achtelik2021-04-101-2/+2
| | | | | | | | | | | | | | | | | | | Android Gradle plugin 4.1.3 is compatible with the new <queries> declaration for package visibility on Android 11. If someone adds the <queries> element or starts relying on a library or SDK that supports targeting Android 11, they might encounter manifest merging errors when building the app. This is important since starting August 2021 the PlayStore requires new apps from targeting Android 11. So lets update to the newest Android Gradle plugin version. This also reverts 1e4dec12d5c0152d5c3eee3b612a0af4bf389a37 as AGP 4.1 requires at least buildToolsVersion 29.0.2. Change-Id: Id8ce5dadeb8a325dc9f901503946f325f3fd18a0 Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Add legacy external storage access flagFabio Falsini2021-04-071-1/+1
| | | | | | | | | | | | | | | Since latest version of Qt need Android target sdk 29 the qt direct storage access doesn't work because a new scoped storage access way has been introduced. This flag allow to have current storage access way to work again (but is limited to target sdk 29 only) Pick-to: 5.15 6.1 Fixes: QTBUG-92239 Change-Id: If0d0af7c171de4b3e8bb8dd9a88fd61b65d1c839 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Merge integration refs/builds/qtci/dev/1617105725Qt CI Bot2021-03-301-0/+5
|\
| * Android: Fix Touch event position depending on SurfaceBartlomiej Moskal2021-03-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Touch event position is counted from begin of Surface. Later method QAndroidPlatformScreen::topLevelAt(..) is trying to return the top level window at the touch event position. In case when Surface is moved, we should also add this move to event position. If it is not happening, touch event will not be assigned to correct window. Fixes: QTBUG-65927 Pick-to: 5.15 Change-Id: I549b9ec964cb09607153c60b9d9f6e0068a04cc2 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Android: Add select and copy capability to read-only text widgetsPiotr Mikolajczyk2021-03-301-3/+1
|/ | | | | | | | | | | | | | | | In case of a read-only text editing widget it was imposibble to copy text from it. In QtWidgets you could not even see the selection handless. Text selection in QtWidgets module was filtered depending on readOnly property of the widget. Additionally, in InputMethod the read-only state was translated into disabled. Patch also makes the edit menu to be aware of the read-only status of the control - the menu items are different for rw and ro controls. Task-number: QTBUG-91417 Change-Id: Ic7b27f78678eeaa87a38607af787f254db1383b8 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: fix wrong position of cursor hander in split screenBartlomiej Moskal2021-03-261-4/+8
| | | | | | | | | | | | Use activity window position to fix position of cursor hander. In case without splti sceen, position of activity window is equal (0, 0), so it does not have any effect. Fixes: QTBUG-91362 Pick-to: 5.15 Change-Id: Icae9f19308112a78bdddf168abe81ffe7b6e4fae Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: fix for isSoftwareKeyboard methodBartlomiej Moskal2021-03-262-8/+15
| | | | | | | | | | | | | | | | | | | | isSoftwareKeyboard() method will rely on visibility flag from activityDelegate. In such case it also need to consider that keyboard is during the hiding. Fix the regression related with commit: e6ca200a3a0aecc2313becf959c1be4fe18bdfa1 Before this change Software Keyboard is not showing after changing the focus. It is happening when Keyboard is already visible and focus is changed to widget that also need the keyboard. In such case keyboard is hiding (and NOT showing again). Pick-to: 5.15 Fixes: QTBUG-92051 Change-Id: I6a5d07b25442429fda6e715d09ea104432c5ef50 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: Fix constant resize of a large TextEdit on clickPiotr Mikolajczyk2021-03-101-0/+14
| | | | | | | | | | | | | If there is a large (3/5 of the screen in portrait or 2/3 in landscape) TextEdit on the screen, and it gets focus on click, it will be shrank to fit the screen. Next click on this TextEdit will restore its normal height, the next will shrink. Pick-to: 5.15 Fixes: QTBUG-91056 Change-Id: I3dbf085cbfdc2739d537a304c16e28c58a6e01ce Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: Place cursor correctly on screen when editingPiotr Mikolajczyk2021-03-053-8/+35
| | | | | | | | | | | | When editing text the cursor is not placed correctly. So this has been achieved by tricking Android into thinking that the input area is only the line where the cursor is, so it is forced to keep it on screen. Fixes: QTBUG-91073 Pick-to: 5.15 Change-Id: Icc2e8315deb76ca1a84819d3fdceaa7b027b1174 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* [Android]: Fix exception when using Qt to create a service on AndroidLars Schmertmann2021-02-191-0/+13
| | | | | | | | Fixes: QTBUG-91194 Pick-to: 5.15 6.0 6.1 Change-Id: Idd243c17bf82150fe2ea8b0100f8c432d75ef249 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* 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 Pick-to: 5.15 6.0 6.1 Change-Id: I8f2c6494da9133a3e9dedaabbe5fc931732d0d72 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add build.gradle to easily modifying Java project with Android StudioAssam Boudjelthia2021-02-124-1/+61
| | | | | | Pick-to: 6.0 6.1 Change-Id: Ie030ff0a3569caa0eacfa331d21f59e5455c90ed Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* 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. Pick-to: 6.1 6.0 5.15 Change-Id: I5178f5f80490b7b0d7e7011d11da402a316d164a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* 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>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-121-31/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-074-90/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@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-084-5/+93
| | | | | | | | | | | | | | | | | | - 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>