summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/android
Commit message (Collapse)AuthorAgeFilesLines
* Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-03-063-10/+9
| | | | | | | | | They document intent more clearly than arithmetic with pi does. Also eliminate some hand-rolled RADIANS_TO_DEGREES constants in favor of calling qRadiansToDegrees(). Change-Id: I7ca5e876b3591433bf681b56ad51c4cb409ac59f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-0210-22/+22
| | | | | | | 'override' keyword can be used directly since Qt 5.7. Change-Id: Ibf0fc590f7e247a310a833a22ece700ec75199bb Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-241-1/+15
|\ | | | | | | Change-Id: I77e9c7f825716af5ab4a1c04551f89e22099696e
| * Android: Fix incorrect accuracy levelsChristian Strømme2016-11-221-1/+15
| | | | | | | | | | | | | | | | | | | | | | Android reports accuracy in four different levels (0, 1, 2 and 3), these values were used directly in Qt, so the reported values would be outside Qt documented range, which is a floating point number between 0 and 1. Task-number: QTBUG-57184 Change-Id: I912a76bffd3e205689103b0352ea4c480d660d63 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-0/+5
|\| | | | | | | Change-Id: I53d801a88bda3a8b8519b6002e1d37053c03e103
| * Make sure JNI_OnLoad is not called more than onceBogDan Vatra2016-07-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I34728572bc279581b8c95c42c206ed104bfc09a5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | This module doesn't need an Activity to work, a Context object is enoughBogDan Vatra2016-07-261-3/+3
| | | | | | | | | | | | | | Task-number: QTBUG-54506 Change-Id: I83576e79f12556479a43aac95123edcacd50c63c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-4/+5
|\| | | | | | | | | | | | | Conflicts: src/sensors/doc/src/compatmap.qdoc Change-Id: I7bd464cbd506f630798091fef3896050ade7b3f8
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-4/+5
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Ia3c3f69505650fd35982fc76e385e744b877e4df Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2023-329/+467
|/ | | | | | | | | | 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: Id129b1497aa9d61fd16332e3b324f28dcf7bdd5b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix crash in AndroidCompassVyacheslav Koscheev2015-05-271-2/+5
| | | | | | Change-Id: I9031610c02d9418b46339c34b02264a03600403c Task-number: QTBUG-45691 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1723-146/+146
| | | | | | | | | 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. Change-Id: I141862df4ed2475c05ebbeb8fe447c4a6e736849 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2423-420/+236
| | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I99c601a398559886c2900f3e04833acfceba8263 Reviewed-by: Antti Kokko <antti.kokko@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Compass sensor implementation for AndroidPaul Olav Tvete2014-08-127-0/+298
| | | | | Change-Id: Ic13d2d1e400a92b2f0c3c83e279c58b799f9d06b Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Android: don't crash if Gravity is not supportedstablePaul Olav Tvete2014-06-023-0/+8
| | | | | | | | | | | | The QtSensors documentation says that if Gravity mode is not available, we should silently fall back to the default Combined mode. In addition, add null pointer checks in case we try to ask for non-existent sensors in the future. Task-number: QTBUG-39335 Change-Id: I6c18622d081db4e3a7d07c744bb0b746e3f5c6ff Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android, Fix generic access to QAccelerometerAndrew Inwood2014-04-092-4/+5
| | | | | | | | | | | | | Generic access to QAccelerometer through QSensor was broken by my previous change: 971fc95eca1d9db93aa4bdb75793dfe83e4a97db When using a QSensor* to access the accelerometer, the qobject_cast would fail, and return 0. I fix this by defaulting the accelerationMode to Combined when a QSensor* is used. Change-Id: If8389808a416807b72709a13ca315aa23bbf94a0 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* add PLUGIN_CLASS_NAME declarations to plugin projectsOswald Buddenhagen2014-04-091-0/+1
| | | | | | | | | | | needed for automatic static linking (and later deployment). the gesture plugins are excluded from the automation based on the assumption that they are usually not needed. the example and the test plugin are also excluded for obvious reasons. Change-Id: I7645aa0daf216ce430989e13d4380dbe6dd2bbd1 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* BlackBerry: update plugin keyAndrew Inwood2014-04-071-1/+1
| | | | | | | | | | | | | | The plugin key for both the Generic backend and the BlackBerry backend were set to "notused". This ultimately caused the Generic backend not to be loaded, which is why QTiltSensor wasn't being exposed. The duplicate keys caused a collision in a QMap in QFactoryLoader, making it look like the generic backend had been created, when it hadn't. Tested on a BlackBerry Z10. Change-Id: Ie5e40586751e7c3b9683a94a39b07efd4fc7fc82 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Implement QAccelerometer accelerationModev5.3.0-beta1Andrew Inwood2014-03-204-3/+49
| | | | | | | | | | | | | | | | | | | The Qt API does not expose Linear Accel and Gravity as separate sensor types, they are different versions of QAccelerometer, accessed by modifying the accelerationMode property. The possible values are Combined, User, and Gravity, which correspond to Acceleration, Linear Acceleration, and Gravity respectively. When constructing the accelerometer backend, the accelerationMode must be queried. The backend must also connect to the accelerationModeChanged signal from the QAccelerometer. I think that the existing implementation of QSensors on Android assumes that there is a one-to-one correspondence between QSensors and AndroidSensorTypes. To fix this assumption, I promoted the m_type attribute of androidcommonsensor.h from private to protected so that a sensor backend can update the Android sensor being used. Task-number: QTBUG-30531 Change-Id: I842d2485109542f74731d179e2720ea55fa248cc Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Make QtSensors use Q_DECL_OVERRIDESamuel Gaist2013-11-198-16/+16
| | | | | | | | | This patch aims to make QtSensors uses Q_DECL_OVERRIDE uniformly across the module Task-number: QTBUG-27392 Change-Id: I5f814f93307159175f92e29a9990587c03cce96f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Android: Add missing sensorsPaul Olav Tvete2013-09-1911-8/+435
| | | | | | | | | This adds Android backends for QAmbientTemperatureSensor, QPressureSensor and QProximitySensor. Task-number: QTBUG-30531 Change-Id: I8d97f62d007c886fcc8dd701e23f6a35a3cbd748 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Make it possible to bundle Android buildsEskil Abrahamsen Blomfeldt2013-05-064-13/+20
| | | | | | | | | Add the bundled jar file and information about required plugins. Task-number: QTBUG-30751 Change-Id: I41918e8f04449439703ef1ae91c78636e9475f36 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Report correct timestamp valuev5.1.0-alpha1Paul Olav Tvete2013-04-045-5/+5
| | | | | | | | Android uses nanoseconds for the timestamp while Qt uses microseconds. Change-Id: I1a6a4c2c3e8cfc950d795e00b7d7546869399f29 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Install the jar fileBogDan Vatra2013-04-021-0/+4
| | | | | | | Change-Id: I7bb84492336a69fc5389f3a26f026f7cb91c7052 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Sensor implementation for AndroidPaul Olav Tvete2013-03-0520-0/+1363
Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Paul Olav Tvete <paul.tvete@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 caa4103a80ef90db5eb9836f6b6028b7ce36c73a Change-Id: I57e772ee5079c0ea74f685b65ae2864d73e7c750 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>