@@ -908,8 +908,11 @@ private boolean checkNotificationsPermissions(int requestCode)
908
908
909
909
private boolean checkFilePermissions (int requestCode )
910
910
{
911
+ if (android .os .Build .VERSION .SDK_INT < android .os .Build .VERSION_CODES .JELLY_BEAN )
912
+ return false ;
913
+
911
914
final int grant = PackageManager .PERMISSION_GRANTED ;
912
- final String exStorage = Manifest .permission .WRITE_EXTERNAL_STORAGE ;
915
+ final String exStorage = Manifest .permission .READ_EXTERNAL_STORAGE ;
913
916
914
917
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU )
915
918
return false ; /* Has no effect, the manage file storage permission is used instead of this */
@@ -939,6 +942,7 @@ private boolean checkFilePermissions(int requestCode)
939
942
"Please, check the External Storage access permission to the application!" );
940
943
b .setNegativeButton (android .R .string .ok , null );
941
944
b .show ();
945
+
942
946
return true ;
943
947
}
944
948
else
@@ -952,9 +956,6 @@ private boolean checkFilePermissions(int requestCode)
952
956
}
953
957
954
958
return true ;
955
- // } // if JELLY_BEAN
956
-
957
- // return false;
958
959
}
959
960
960
961
public boolean hasManageAppFS ()
@@ -988,7 +989,8 @@ public void onClick(DialogInterface dialog, int whichButton)
988
989
}
989
990
990
991
@ Override
991
- public void onRequestPermissionsResult (int requestCode , @ NonNull String [] permissions ,
992
+ public void onRequestPermissionsResult (int requestCode ,
993
+ @ NonNull String [] permissions ,
992
994
@ NonNull int [] grantResults )
993
995
{
994
996
super .onRequestPermissionsResult (requestCode , permissions , grantResults );
0 commit comments