-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show an alert dialog when no appropriate file manager was found #7452
Show an alert dialog when no appropriate file manager was found #7452
Conversation
Now those no-file-manager-installed issues shall be opened no more. Note: I think all usages of "file-picker" and "directory-picker" should be unhyphenated (as in "file picker" and "directory picker"), same with "download-settings". sorry for nitpicking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there too much code duplication? Why not just add a launchAndCheck(ActivityResultLauncher<Intent>, Intent, Context)
function to NoFileManagerHelper
, that does the try-catch?
app/src/main/java/org/schabi/newpipe/streams/io/NoFileManagerSafeGuard.java
Outdated
Show resolved
Hide resolved
Kinda makes you wonder how they managed to install the app in the first place, huh? 😉 |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me, except from the string ;-)
Co-authored-by: Stypox <stypox@pm.me>
Black magic I guess 😆 (they likely installed it with F-Droid which requires no file-manager for installation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great :-)
What is it?
Description of the changes in your PR
Before/After Screenshots/Screen Record
<App crashed>
← Android 10+
Fixes the following issue(s)
ActivityNotFoundException
(file-manager) and display a meaningful error #7113 and more than 10 other issues where users managed to have no file-manager.APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence
How to test this?
To test this you have to get rid of all your file-managers (may led to data loss or other side effects). This may require disabling system apps.
I strongly recommend doing this on an emulator only!
How to do it on an emulated Android 10 device:
adb shell
(ensure that you are connected to the correct device!)su
pm disable com.android.documentsui
→ Now you can deploy NewPipe to the emulator and check if the changes work as expected