Skip to content
This repository was archived by the owner on Jun 14, 2022. It is now read-only.

Fix scan QR code on android 11 #807

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

ziegenberg
Copy link
Contributor

@ziegenberg ziegenberg commented Apr 11, 2021

FIXES #806.

The Activity#setContentView(int) in CaptureActivity#initializeContent() of the superclass needs to be called before getInsetsController(), otherwise, an NPE will be thrown because the top-level view of the current Window, containing the window decor, is not yet initialized.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
…tInsetsController()

The Activity#setContentView(int) in CaptureActivity#initializeContent() of super class needs to be called
before getInsetsController(), otherwise NPE will be thrown because the top-level view of
the current Window, containing the window decor, is not yet initialized.

FIXE andOTP#806

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
@ziegenberg ziegenberg marked this pull request as ready for review April 11, 2021 18:59
@ziegenberg ziegenberg requested a review from flocke April 12, 2021 07:57
Copy link
Member

@flocke flocke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it in a Android 11 AVD and everything seems to work as expected.

@flocke flocke merged commit 8900e82 into andOTP:master Apr 15, 2021
@ziegenberg ziegenberg deleted the 806-fix-scan-qr-code-on-android-11 branch July 10, 2021 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App Crashes When Tapping On Scan QR Code
2 participants