For #27228 - Resume qr scanning if camera permission is changed

If permissions are changed the app process is restarted with the same
happening for the previously running app components.
SearchDialogFragment used for searches will check if qr scanning was in
progress and resume if needed.
PairFragment used for signing-in will start scanning on itself.

Android-Components will avoid resuming the scan functionality if the camera
permission is missing and so allow to request the permission again without the
camera permission related system calls causing issues.
fork
Mugurell 2 years ago committed by mergify[bot]
parent 43612486e4
commit 9671d0a638

@ -522,6 +522,12 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
override fun onResume() {
super.onResume()
qrFeature.get()?.let {
if (it.isScanInProgress) {
it.scan(binding.searchWrapper.id)
}
}
view?.post {
// We delay querying the clipboard by posting this code to the main thread message queue,
// because ClipboardManager will return null if the does app not have input focus yet.

Loading…
Cancel
Save