Use DialogFragment instead of an AlertDialog for runtime permissions
Summary
Use a DialogFragment instead of an AlertDialog from runtime permissions because
- AlertDialog does not survive orientation changes
- It's recommended to do so see: dialogs
Test Plan
Revoke 1 or more runtime permissions, apply patch and run kdeconnect
Click on the plugin that needs a runtime permission in the DeviceFragment
Verify that:
- the DialogFragment looks exactly like an AlertDialog
- the DialogFragment shows the same information as the old AlertDialog
- the DialogFragment survives an orientation change
- Verify that the systems permission request dialog is displayed after pressing OK