feat: Component to handle permissions request (A13+)
Starting from Android 13, notification permission is now not granted by default. With this motivation, I created a component to handle permission requests (PermissionRequestHandler). This will show a dialog with an explantion of why the permission is requested, and will allow the user to give or reject the permission. Currently this is just used for the notifications permission, but it's possible other permissions will be needed in the future.
I have also added a notification when the patching process is completed (both in case of success and failure).
I don't know if permissions should be requested on app launch or in the patcher screen. This is up to the UI team to decide.
My reasoning for putting the dialog in the patcher screen is that there is already a popup shown at app first launch (to configure updates). Once that is closed, there are two mores "alert", one for the battery optimization and one for the downloaders configuration.
I didn't want to add another dialog to not overwhelm the user; also the notification permission is striclty related to the patching process (for now at least). Of course, it can be changed according to what UI team thinks.
- The new "Patching completed" notification should not include
Tap to return to the patchersentence. Because it will be displayed even when the patcher screen is open. This text was originally created for background running notifications. It's not necessary in the patching completion notification. - The new "Patching completed" notification is a bit annoying. What's particularly annoying is having to manually clear the notifications after every patching. It would be convenient if notifications were automatically deleted upon leaving the patcher screen.
Hi. I see in your screenshot that there is a problem with the white ReVanced logo being displayed on a white background. I plan to fix this in https://github.com/ReVanced/revanced-manager/pull/2762, can you please rebase this PR to the dev branch? Thanks
By the way, does this PR fix the lack of a notification icon in the status bar during patching?