You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/image_picker/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
+2-101Lines changed: 2 additions & 101 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@
4
4
5
5
packageio.flutter.plugins.imagepicker;
6
6
7
-
importandroid.Manifest;
8
7
importandroid.app.Activity;
9
8
importandroid.content.Intent;
10
9
importandroid.content.pm.PackageManager;
@@ -15,7 +14,6 @@
15
14
importandroid.os.Build;
16
15
importandroid.provider.MediaStore;
17
16
importandroidx.annotation.VisibleForTesting;
18
-
importandroidx.core.app.ActivityCompat;
19
17
importandroidx.core.content.FileProvider;
20
18
importio.flutter.plugin.common.MethodCall;
21
19
importio.flutter.plugin.common.MethodChannel;
@@ -42,19 +40,7 @@ enum CameraDevice {
42
40
* means that the chooseImageFromGallery() or takeImageWithCamera() method was called at least
43
41
* twice. In this case, stop executing and finish with an error.
44
42
*
45
-
* <p>2. Check that a required runtime permission has been granted. The takeImageWithCamera() method
46
-
* checks that {@link Manifest.permission#CAMERA} has been granted.
47
-
*
48
-
* <p>The permission check can end up in two different outcomes:
49
-
*
50
-
* <p>A) If the permission has already been granted, continue with picking the image from gallery or
51
-
* camera.
52
-
*
53
-
* <p>B) If the permission hasn't already been granted, ask for the permission from the user. If the
54
-
* user grants the permission, proceed with step #3. If the user denies the permission, stop doing
55
-
* anything else and finish with a null result.
56
-
*
57
-
* <p>3. Launch the gallery or camera for picking the image, depending on whether
43
+
* <p>2. Launch the gallery or camera for picking the image, depending on whether
58
44
* chooseImageFromGallery() or takeImageWithCamera() was called.
59
45
*
60
46
* <p>This can end up in three different outcomes:
@@ -69,36 +55,23 @@ enum CameraDevice {
69
55
*
70
56
* <p>C) User cancels picking an image. Finish with null result.
Copy file name to clipboardExpand all lines: packages/image_picker/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerPlugin.java
0 commit comments