ligi/PassAndroid

Remove unneeded storage permissions

soshial opened this issue · 3 comments

When importing a pkpass file, no storage permission is actually needed, since the pkpass file contents are copied into app private memory anyway.

  1. Tested on Android 11 and 12 -- and it imported pkpass file perfectly WITHOUT storage permission:

https://github.com/ligi/PassAndroid/blob/master/android/src/main/java/org/ligi/passandroid/ui/PassImportActivity.kt#L41

Screenshot 2022-06-26 at 19 22 22

  1. Changing pkpass image could also easily be done without abolute file path: https://github.com/ligi/PassAndroid/blob/master/android/src/main/java/org/ligi/passandroid/ui/edit/ImageEditHelper.kt#L34

Providing an app storage permissions is a dangerous thing and I'd suggest to never do this, when this is so easily avoidable.

As seen in #434 (comment) it turns out that permissions might be necessary in order to read and import passports on Android 13

ligi commented

Thanks - but I also need to fix it for Android 13 - as far as I see #460 is the solution.

Thank you @ligi, v3.7.3 works perfectly on Android 13.

Also, I think this option should be removed on Android 13+ (because it won't ever work on recent Android versions):
Screenshot_20230519_204538_PassAndroid