iFixit / iFixitAndroid

Official iFixit Android App
https://play.google.com/store/apps/details?id=com.dozuki.ifixit
GNU General Public License v3.0
162 stars 88 forks source link

Barcode scanner: Fix failing scan result parsing #210

Closed marczych closed 10 years ago

marczych commented 10 years ago
  1. Go to the Media Manager.
  2. Add an image from the Gallery.
  3. A "Failed to parse result" toast is displayed but everything works as expected.

This is caused by the ZXing library parsing the Activity result but returning a null IntentResult because the request codes didn't match. The app didn't crash because the parsing code is all wrapped in a try/catch to swallow all errors because of the tricky reflection. This fixes the bug which removes the awkward Toast.