From 36d7f9112ca476539e6656aaec917a0c676ce3da Mon Sep 17 00:00:00 2001 From: Roc Boronat Date: Thu, 15 Oct 2020 11:08:39 +0200 Subject: [PATCH] Wrap the code that mocks the camera with a try-catch clause --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3973c25..3ae2a795 100644 --- a/README.md +++ b/README.md @@ -371,10 +371,13 @@ Mocking the Android Camera Intent is a tricky thing to do. To accomplish it in n Here's an example to copy paste: ```java -Intents.init(); -mockAndroidCamera(); -clickOn(R.id.launch_camera); -Intents.release(); +try { + Intents.init(); + BaristaIntents.mockAndroidCamera(); + clickOn(R.id.launch_camera); +} finally { + Intents.release(); +} ``` ## Runtime Permissions