Skip to content

Commit

Permalink
Fix Android CHipTool QRCode scan crash issue (#25141)
Browse files Browse the repository at this point in the history
  • Loading branch information
joonhaengHeo authored and pull[bot] committed Dec 15, 2023
1 parent 2ed4d7f commit 1689444
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class BarcodeFragment : Fragment() {
Log.e(TAG, "Unrecognized QR Code", ex)
Toast.makeText(requireContext(), "Unrecognized QR Code", Toast.LENGTH_SHORT).show()
}
FragmentUtil.getHost(this, Callback::class.java)
FragmentUtil.getHost(this@BarcodeFragment, Callback::class.java)
?.onCHIPDeviceInfoReceived(CHIPDeviceInfo.fromSetupPayload(payload))
}

Expand All @@ -201,7 +201,7 @@ class BarcodeFragment : Fragment() {
Toast.makeText(requireContext(), "Unrecognized QR Code", Toast.LENGTH_SHORT).show()
return@post
}
FragmentUtil.getHost(this, Callback::class.java)
FragmentUtil.getHost(this@BarcodeFragment, Callback::class.java)
?.onCHIPDeviceInfoReceived(CHIPDeviceInfo.fromSetupPayload(payload))
}
}
Expand Down

0 comments on commit 1689444

Please sign in to comment.