Skip to content

Conversation

@ouchadam
Copy link
Contributor

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Adds missing QrScannerFragment arguments when scanning a QR code accept accepting the camera permission for the first time

Motivation and context

Fixes #5295

Screenshots / GIFs

BEFORE AFTER
before-add-room-qr after-add-room-qa

Tests

  • With a fresh install
  • Attempt to add a room by qr code

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 10

@ouchadam ouchadam added Z-Crash Z-NextRelease For issues and PRs which should be included in the NextRelease. labels Feb 22, 2022

private val qrViewModel: QrCodeScannerViewModel by activityViewModel()
private val scannerArgs: QrScannerArgs? by args()
private val scannerArgs: QrScannerArgs by args()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

args() can't be null

fun args(): T {
  ...
  return value ?: throw IllegalArgumentException("")
} 

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

Unit Test Results

  84 files  ±0    84 suites  ±0   1m 6s ⏱️ +8s
157 tests ±0  157 ✔️ ±0  0 💤 ±0  0 ±0 
504 runs  ±0  504 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 16e3723. ± Comparison against base commit 116f7d0.

@github-actions
Copy link

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    passed=
  • [org.matrix.android.sdk.account]
    passed=
  • [org.matrix.android.sdk.internal]
    passed=
  • [org.matrix.android.sdk.ordering]
    passed=
  • [org.matrix.android.sdk.PermalinkParserTest]
    passed=

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks!

@bmarty bmarty merged commit 77c48f2 into develop Feb 22, 2022
@bmarty bmarty deleted the feature/adm/crash-when-reading-qr branch February 22, 2022 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-Crash Z-NextRelease For issues and PRs which should be included in the NextRelease.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash - Mavericks IllegalArgumentException in QrCodeScannerFragment

4 participants