OpenLauncherTeam / openlauncher

Customizable and Open Source Launcher for Android
Apache License 2.0
1.41k stars 413 forks source link

Add ZIP extension filter to restore backup #686

Closed osirisinferi closed 1 year ago

osirisinferi commented 2 years ago

Fixes #685.

Please review the code carefully. It works locally on my Fairphone 4 5G, but I'm not a Java developer, nor Android developer.

PR is based on code from https://stackoverflow.com/questions/31285273/how-do-i-use-a-filteredfilepickerfragment-for-nononsense-filepicker and code from http://spacecowboy.github.io/NoNonsense-FilePicker/example/filter_file_extension/

Please refer to your legal team to make sure using the code from stackoverflow this way is compatible with OpenLaunchers license.

gsantner commented 1 year ago

Please refer to your legal team

what legal team? there is no company behind this project.

Can this be closed? Have you tried this a while and can tell me it works OK without crashes?

osirisinferi commented 1 year ago

what legal team? there is no company behind this project.

In that case you should ask yourself if you're comfortable with adding copy/pasted code from StackOverflow to your project I guess :slightly_smiling_face:

I must admit, I've only tried it once to get an export from the native app to my own compiled version. And that worked without it crashing. But that's just literally n=1, on just one phone and just one attempt :stuck_out_tongue:

That said, OpenLauncher does seem to have crashed sometimes when I unlock my phone, but I have no idea if that could/would be related to this change. Seems unlikely, as just unlocking the phone should not trigger the ZipFilePickerActivity, right?