mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-18 19:22:51 +08:00
fix(android): Use VERSION_CODES instead of hard-coded API literals (#904)
This commit is contained in:
parent
44480300d9
commit
feb7643bc3
@ -518,7 +518,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
|||||||
if (this.allowEdit && this.croppedUri != null) {
|
if (this.allowEdit && this.croppedUri != null) {
|
||||||
writeUncompressedImage(croppedUri, galleryUri);
|
writeUncompressedImage(croppedUri, galleryUri);
|
||||||
} else {
|
} 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);
|
writeTakenPictureToGalleryLowerThanAndroidQ(galleryUri);
|
||||||
} else { // Android Q or higher
|
} else { // Android Q or higher
|
||||||
writeTakenPictureToGalleryStartingFromAndroidQ(galleryPathVO);
|
writeTakenPictureToGalleryStartingFromAndroidQ(galleryPathVO);
|
||||||
|
Loading…
Reference in New Issue
Block a user