From feb7643bc37f2a37e9bda5a60929a98ee62446bc Mon Sep 17 00:00:00 2001 From: Norman Breau Date: Fri, 25 Oct 2024 13:10:05 -0300 Subject: [PATCH] fix(android): Use VERSION_CODES instead of hard-coded API literals (#904) --- src/android/CameraLauncher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java index 6dfe3cb..b716dc6 100644 --- a/src/android/CameraLauncher.java +++ b/src/android/CameraLauncher.java @@ -518,7 +518,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect if (this.allowEdit && this.croppedUri != null) { writeUncompressedImage(croppedUri, galleryUri); } else { - if (Build.VERSION.SDK_INT <= 28) { // Between LOLLIPOP_MR1 and P, can be changed later to the constant Build.VERSION_CODES.P + if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { writeTakenPictureToGalleryLowerThanAndroidQ(galleryUri); } else { // Android Q or higher writeTakenPictureToGalleryStartingFromAndroidQ(galleryPathVO);