diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-09-08 05:52:29 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2020-09-11 05:32:28 +0000 |
commit | 37f4c6fbc28617fdd3343033c6f926ec2263fce2 (patch) | |
tree | 5bb294878d9e9d2dd11fc11f17104a3b6442b72c /src | |
parent | b028fb60e30ec7848096276bfeeac13091b888f8 (diff) | |
download | qtbase-37f4c6fbc28617fdd3343033c6f926ec2263fce2.tar.gz |
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.
Pick-to: 5.15
Change-Id: If663e3cf0a10818931577988abdc0fb8ec2650db
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/android/jar/src/org/qtproject/qt5/android/QtNative.java | 4 |
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 8d0777e5bc..6fd6a9ca98 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java @@ -193,6 +193,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(); |