Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48372e31 authored by Alan Newberger's avatar Alan Newberger Committed by Android Git Automerger
Browse files

am ebbcc394: Avoid crash if user disables Camera while Gallery is open

* commit 'ebbcc394':
  Avoid crash if user disables Camera while Gallery is open
parents dcd1b260 ebbcc394
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -247,7 +247,13 @@ public class GalleryUtils {
        Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA)
                .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
                        | Intent.FLAG_ACTIVITY_NEW_TASK);
        try {
            context.startActivity(intent);
        } catch (ActivityNotFoundException e) {
            // This will only occur if Camera was disabled while Gallery is open
            // since we cache our availability check. Just abort the attempt.
            Log.e(TAG, "Camera activity previously detected but cannot be found", e);
        }
    }

    public static void startGalleryActivity(Context context) {