mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-01-19 04:18:04 -05:00
920: Crash on clicking "Add from image" button in scan activity #856 r=TheLastProject a=alajemba-vik This PR contains a fix for issue #856, which concerns a crash that occurs when no activity can handle the intent to pick an image file. ### The simplest way to reproduce * Disable all the gallery apps (e.g., Google Photos) * Go to the ScanActivity by clicking the FAB on the home screen * The app crashes when you click the button "Select image from gallery" ### Expected behavior Clicking that button should have launched a gallery app, or displayed a disambiguation dialog if there is more than one app that can handle the intent being invoked. ### Solution Wrapped the call to launch in a try-catch block. Co-authored-by: Alajemba <alajemba.dev@gmail.com>