Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0
-
None
-
-
3
-
10242a825 (dev), f85e783e6 (6.5)
-
Foundations Sprint 79
Description
On Android the QPermission object might resolve to multiple underlying permission strings. See QLocationPermission and QBluetoothPermission as examples.
The Android backend implementation takes a QPermission object, and extracts a list of permissions.
The QPermissions::Private::checkPermission() method on Android always checks for the first permission only, and uses its status as a result. This can lead to a situation when one permission is granted, and the others are not, but the API incorrectly reports that all permissions are granted.
The QPermission::Private::requestPermission() method on Android uses the QtAndroidPrivate::requestPermissions() method, which correctly requests multiple permissions and returns a QFuture with multiple results. However, only the first result is used to extract the status and report it in the callback. This, again, can lead to a situation, when only the first permission was granted, but the API reports that all permissions were granted.
To fix both cases we need to collect individual statuses from different permissions, and report a combined status to the user. The combined status would be the "worst" status of all. If one of the permissions is Denied, we can't report that the permission is granted...
Attachments
For Gerrit Dashboard: QTBUG-112527 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
470479,3 | QPermission: return the combined result of a permission group on Android | dev | qt/qtbase | Status: MERGED | +2 | 0 |
470867,2 | QPermission: return the combined result of a permission group on Android | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |