mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Android 13 permission related fixes (#5299)
* Android 13 permission related fixes * removes audio and video as permissions
This commit is contained in:
parent
f5770539a5
commit
6881158743
12 changed files with 162 additions and 125 deletions
|
|
@ -362,15 +362,12 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
|
||||
@OnClick(R.id.mediaDetailImageViewSpacer)
|
||||
public void launchZoomActivity(final View view) {
|
||||
final boolean permission = PermissionUtils.
|
||||
hasPermission(getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
|
||||
if (permission) {
|
||||
final boolean hasPermission = PermissionUtils.hasPermission(getActivity(), PermissionUtils.PERMISSIONS_STORAGE);
|
||||
if (hasPermission) {
|
||||
launchZoomActivityAfterPermissionCheck(view);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
PermissionUtils.checkPermissionsAndPerformAction(getActivity(),
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
PermissionUtils.PERMISSIONS_STORAGE,
|
||||
() -> {
|
||||
launchZoomActivityAfterPermissionCheck(view);
|
||||
},
|
||||
|
|
@ -1076,7 +1073,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
|
||||
} else if (requestCode == REQUEST_CODE && resultCode == RESULT_CANCELED) {
|
||||
viewUtil.showShortToast(getContext(),
|
||||
Objects.requireNonNull(getContext())
|
||||
requireContext()
|
||||
.getString(R.string.coordinates_picking_unsuccessful));
|
||||
|
||||
} else if (requestCode == REQUEST_CODE_EDIT_DESCRIPTION && resultCode == RESULT_CANCELED) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue