summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/androidjniaccessibility.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Android: Reserve space for the QVarLengthArray, so we can use appendAndy Shaw2017-12-051-1/+2
| | | | | | | | | | When the QVarLengthArray was initialized with a size then append would add to the end of that. Therefore we need to use reserve to get the desired effect. Task-number: QTBUG-64905 Change-Id: Ia1ebeb26cd31bc5e92bd7f81079506a266b845bf Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Refactor childIdListForAccessibleObjectJan Arve Sæther2017-10-251-7/+7
| | | | | | | | | | | | | | | | | | | It has several problems: 1. It could potentially create an intArray with uninitialized elements. This could happen because the index for getting interfaces were the same as the storage index. This was not correct, because they could diverge if iface->child() returned an invalid interface. 2. The count of accessible child elements could change while iterating. This could cause out-of-bounds condition when calling SetIntArrayRegion as described in QTBUG-45855. Instead now, we call SetIntArrayRegion only once, after we have gathered all the child interface ids. Task-number: QTBUG-45855 Change-Id: I77e813158df5f563d04931ac4e296e3fc2a16e67 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Android Accessibility: protect from accessing invalid interfacesFrederik Gladhorn2017-10-171-8/+12
| | | | | | | | | | | I am not sure if this is going to help, but it is required that the bridge checks that the interfaces it accesses are valid, since that protects from accessing them when they are in the destructor. This should be done, whether it fixes the issue or not. Task-number: QTBUG-45855 Change-Id: I2b96999ca4043f8b33607c864d1d178695d03192 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Android: Add lock to protect access to the platform interfaceChristian Stromme2017-07-031-0/+1
| | | | | | | | | | Fixes dubious lock protecting the platform interface handle, and makes sure that we lock and hold a valid reference to the platform interface before accessing it. Since the platform interface is exposed we also need to expose the mutex protecting it. Change-Id: I1ec1219a75c589bc793676369b11fb403de20102 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: Fix Accessibility items positioning with QHighDpi enabledKonstantin Ritt2017-03-161-3/+6
| | | | | | | the View's position and metrics are in pixels, not points Change-Id: I285d5378db98187f54019bff9b8a1cde05dc3b35 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: remove unused variableBogDan Vatra2016-12-091-1/+0
| | | | | | | Fix compilation with -Werror Change-Id: Iae6068f9eeb92dd1a96b11f6bb7017b97a8486fb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* port to modularized platformsupport librariesOswald Buddenhagen2016-10-151-1/+1
| | | | | Change-Id: I20eb0e33abfd70b6a5240e7b6b0aa0425f2d2ee7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Android: Remove support for API < 16BogDan Vatra2015-12-101-7/+0
| | | | | | | | | Starting with Qt 5.7 we removed support for API < 16 (Android v4.1) [ChangeLog][Android] Support for Android API < 16 was removed. Change-Id: I8bf396a9d70ab0996965e0c9f629800aa1fa6a45 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Delay initialization of Accessibility.Christian Strømme2015-06-091-0/+10
| | | | | | | | | | | | | The accessibility class was created and activated in onCreate(), which meant we where trying to activate accessibility before the platform plugin was properly initialized. With this change we will also activate, or deactivate, accessibility in Qt whenever the state is changed by Android, compared to doing it at start-up only. Task-number: QTBUG-46355 Change-Id: I5cbae125df43f7694d4464d5054e6cfec4626e26 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Consolidate how contentDescription is calculated.Jan Arve Saether2014-10-151-10/+18
| | | | | | | | | | | | | | | | | | Previously, the behavior was different depending on if the contentDescription was calculated as a result of an event, or if it was calculated as a result of hierarchy traversal. Refactor the functionality into one single function that will be used in both scenarios. 'contentDescription' will now receive its value from one of the following sources, listed in prioritised order (QAI == QAccessibleInterface): 1. QAI::text(QAccessible::Name) 2. QAI::text(QAccessible::Description) 3. QAI::text(QAccessible::Value) 4. QAI::valueInterface()->currentValue() Change-Id: I2e4958a1e95b5f20d01da37c23ecbc09842360bc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-011-3/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Android: Fix namespace usageChristian Strømme2014-06-301-0/+4
| | | | | | | | | | | | | | This change makes it possible to set a Qt namespace for Android builds. Change-Id: I79f4ae8200223f36f97e2849aae49e45b8850d23 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Make sure we run gracefully below API level 18Jan Arve Saether2014-06-101-3/+10
| | | | | | | | | | | | | | Task-number: QTBUG-39508 Change-Id: I023ba7c50de5c95a5514658797125e22016a6543 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Accessibility: Add actions for value interfacesJan Arve Saether2014-06-201-10/+38
|/ | | | | | | | | | | To support increment / decrement of sliders, dials and spin boxes. (anything with an {in,de}crementAction or a valueInterface. Other platforms will follow the same pattern in follow-up patches. Task-number: QTBUG-38832 Change-Id: Ie570acc39b3d9494a8bb9f624b61a398b1d8de89 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Do not resolve the java functions for each callJan Arve Saether2014-05-301-21/+41
| | | | | | | | Instead do it only once (in registerNatives). This is seems to be the preferred way of doing it in other parts of the platform plugin. Change-Id: I361a7862bb5a24b4024c7c6a30ecb14fc515d4ff Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility Android: Fix statesFrederik Gladhorn2014-05-161-6/+5
| | | | | | | | | | | | Using the bit flags as parameters to the JNI functions would fail since they'd always be cast to false instead of the c-style casts. This fixes checkboxes reporting themselves as checkable and their check state. Task-number: QTBUG-38831 Change-Id: I30ab63ceabbec4cc2fbda9475e05523d915087fe Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Android: Fix crash for invalid interfacesFrederik Gladhorn2014-05-131-4/+6
| | | | | | | | | | | When asked for an accessibility interface with invalid ID we still return an AccessibilityNodeInfo. But instead of setting that interfaces' ID to the invalid ID, rather return one with no ID set so it will simply fall back to the view. Task-number: QTBUG-38829 Change-Id: If66f5b1b42ba46949d94a547050c7a2cfc7ee9b7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Android: Make debug tags consistentFrederik Gladhorn2014-05-081-1/+1
| | | | | Change-Id: I712e64002234d546365b44ca15ae93e8decac882 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Android: Do not always append roleFrederik Gladhorn2014-05-071-8/+0
| | | | | | Task-number: QTBUG-36584 Change-Id: Id14962a9eb7a6c3ea78cefcfcc053fac886ba8f7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Support multiple native surfaces on Android.BogDan Vatra2014-01-171-0/+272
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>