Skip to content

Commit

Permalink
Hotfix: Fixed an inability to open the file browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Jul 3, 2023
1 parent bd7060d commit 430b35a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ADLMIDI-Player/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ android {
applicationId "ru.wohlsoft.adlmidiplayer"
minSdkVersion 14
targetSdkVersion 33
versionCode 1050011
versionName '1.5.0.11'
versionCode 1050012
versionName '1.5.0.12'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
externalNativeBuild {
cmake {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,11 @@ private boolean checkNotificationsPermissions(int requestCode)

private boolean checkFilePermissions(int requestCode)
{
if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN)
return false;

final int grant = PackageManager.PERMISSION_GRANTED;
final String exStorage = Manifest.permission.WRITE_EXTERNAL_STORAGE;
final String exStorage = Manifest.permission.READ_EXTERNAL_STORAGE;

if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
return false; /* Has no effect, the manage file storage permission is used instead of this */
Expand Down Expand Up @@ -939,6 +942,7 @@ private boolean checkFilePermissions(int requestCode)
"Please, check the External Storage access permission to the application!");
b.setNegativeButton(android.R.string.ok, null);
b.show();

return true;
}
else
Expand All @@ -952,9 +956,6 @@ private boolean checkFilePermissions(int requestCode)
}

return true;
// } // if JELLY_BEAN

// return false;
}

public boolean hasManageAppFS()
Expand Down Expand Up @@ -988,7 +989,8 @@ public void onClick(DialogInterface dialog, int whichButton)
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
public void onRequestPermissionsResult(int requestCode,
@NonNull String[] permissions,
@NonNull int[] grantResults)
{
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
Expand Down

0 comments on commit 430b35a

Please sign in to comment.