summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-09-08 05:52:29 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-09-11 08:02:09 +0000
commit81b7fa2673e35d08c286a4651fb74aad8469f538 (patch)
tree6da5a77e0a0053ce53df09894cfd75aadd8390e0 /src/android
parent89c8581bb1531b486f13d463a6767ec417947e5c (diff)
Android: Pass the parsed URI if it fails to get permission on 23 or less
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. Change-Id: If663e3cf0a10818931577988abdc0fb8ec2650db Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 37f4c6fbc28617fdd3343033c6f926ec2263fce2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
index 7f783a0e93..16b60d9845 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
@@ -191,6 +191,10 @@ public class QtNative
return iterUri;
}
+ // Android 6 and earlier could still manage to open the file so we can return the
+ // parsed uri here
+ if (Build.VERSION.SDK_INT < 24)
+ return parsedUri;
return null;
} catch (SecurityException e) {
e.printStackTrace();