File tree 1 file changed +2
-12
lines changed
mediapicker/src/main/java/org/wordpress/android/mediapicker/util
1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -55,28 +55,18 @@ internal class MediaPickerPermissionUtils @Inject constructor(
55
55
}
56
56
57
57
fun hasPermissionsToTakePhotos (): Boolean {
58
- return hasCameraPermission() && ( VERSION . SDK_INT > VERSION_CODES . P || hasWriteStoragePermission())
58
+ return hasCameraPermission()
59
59
}
60
60
61
61
val permissionsForTakingPhotos: List <PermissionsRequested >
62
- get() = if (VERSION .SDK_INT > VERSION_CODES .P ) {
63
- listOf (CAMERA )
64
- } else {
65
- listOf (CAMERA , WRITE_STORAGE )
66
- }
62
+ get() = listOf (CAMERA )
67
63
68
64
fun hasReadStoragePermission (): Boolean {
69
65
return ContextCompat .checkSelfPermission(
70
66
context, permission.READ_EXTERNAL_STORAGE
71
67
) == PackageManager .PERMISSION_GRANTED
72
68
}
73
69
74
- private fun hasWriteStoragePermission (): Boolean {
75
- return ContextCompat .checkSelfPermission(
76
- context, permission.WRITE_EXTERNAL_STORAGE
77
- ) == PackageManager .PERMISSION_GRANTED
78
- }
79
-
80
70
private fun hasCameraPermission (): Boolean {
81
71
return ContextCompat .checkSelfPermission(
82
72
context,
You can’t perform that action at this time.
0 commit comments