Skip to content

Commit 4768bea

Browse files
naxelfacebook-github-bot
authored andcommitted
Fix CameraRoll.getPhotos() crash on Android if device has a problematic video asset (#21438)
Summary: Changed catching IOException to Exception Fixes #20112 Pull Request resolved: #21438 Differential Revision: D10132453 Pulled By: hramos fbshipit-source-id: c68fa8c45d43e4f2d116b8084ffd731ad6bf5aec
1 parent 07ac31e commit 4768bea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/src/main/java/com/facebook/react/modules/camera/CameraRollManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ private static boolean putImageInfo(
443443
retriever.release();
444444
photoDescriptor.close();
445445
}
446-
} catch (IOException e) {
446+
} catch (Exception e) {
447447
FLog.e(ReactConstants.TAG, "Could not get video metadata for " + photoUri.toString(), e);
448448
return false;
449449
}

0 commit comments

Comments
 (0)