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>
bb10
Andy Shaw 2020-09-08 05:52:29 +02:00
parent b028fb60e3
commit 37f4c6fbc2
1 changed files with 4 additions and 0 deletions

View File

@ -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();