Skip to content

Commit

Permalink
[Android] Fix crash when scan QR Code (#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 <yunhanw@google.com>
  • Loading branch information
2 people authored and pull[bot] committed Apr 24, 2024
1 parent e05efc7 commit 4460713
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 4460713

Please sign in to comment.