Skip to content

Commit

Permalink
[Android] Fix crash when scan QR Code (project-chip#25958)
Browse files Browse the repository at this point in the history
* [Android] Fix crash when scan QR Code

* Fix Android Crash when QR Scan

* [Android] Enable Back-button on 'Scan QR Code' Menu

* Update SelectActionFragment.kt

Add OtaProviderClientFragment to backstack as well

---------

Co-authored-by: yunhanw-google <[email protected]>
  • Loading branch information
jeonghwan7 and yunhanw-google authored Jan 18, 2024
1 parent b044b5e commit e59fd33
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class SelectActionFragment : Fragment() {

/** Notifies listener of Scan QR code button click. */
private fun handleScanQrCodeClicked() {
showFragment(BarcodeFragment.newInstance(), false)
showFragment(BarcodeFragment.newInstance())
}

/** Notifies listener of Light On/Off & Level Cluster button click. */
Expand Down Expand Up @@ -221,24 +221,24 @@ class SelectActionFragment : Fragment() {
}

private fun handleOTAProviderClicked() {
showFragment(OtaProviderClientFragment.newInstance(), false)
showFragment(OtaProviderClientFragment.newInstance())
}

/** Notifies listener of provision-WiFi-credentials button click. */
private fun handleProvisionWiFiCredentialsClicked() {
getCallback()?.SetNetworkType(ProvisionNetworkType.WIFI)
showFragment(BarcodeFragment.newInstance(), false)
showFragment(BarcodeFragment.newInstance())
}

/** Notifies listener of provision-Thread-credentials button click. */
private fun handleProvisionThreadCredentialsClicked() {
getCallback()?.SetNetworkType(ProvisionNetworkType.THREAD)
showFragment(BarcodeFragment.newInstance(), false)
showFragment(BarcodeFragment.newInstance())
}

/** Notifies listener of provision-custom-flow button click. */
private fun handleProvisionCustomFlowClicked() {
showFragment(BarcodeFragment.newInstance(), false)
showFragment(BarcodeFragment.newInstance())
}

private fun handleGroupSettingClicked() {
Expand Down

0 comments on commit e59fd33

Please sign in to comment.