Skip to content

Commit

Permalink
use only FLAG_GRANT_READ_URI_PERMISSION for SettingActivity of sasquatch
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov committed Oct 12, 2023
1 parent 8e533b5 commit c154dd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apps/sasquatch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
flavorDimensions "dependency", "distribute"

defaultConfig {
versionCode 302
versionName "5.0.3"
versionCode 301
versionName "5.0.2"
externalNativeBuild {
ndkBuild {
arguments "NDK_APPLICATION_MK=Application.mk", "V=1"
Expand Down Expand Up @@ -64,6 +64,7 @@ android {
path "Android.mk"
}
}
ndkVersion '26.0.10792818'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.FileObserver;
import android.preference.CheckBoxPreference;
Expand Down Expand Up @@ -738,7 +739,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == FILE_ATTACHMENT_DIALOG_ID) {
Uri fileAttachment = resultCode == RESULT_OK && data != null ? data.getData() : null;
if (fileAttachment != null) {
getActivity().getContentResolver().takePersistableUriPermission(fileAttachment, data.getFlags() & Intent.FLAG_GRANT_READ_URI_PERMISSION);
getActivity().getContentResolver().takePersistableUriPermission(fileAttachment, Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
MainActivity.setFileAttachment(fileAttachment);
Preference preference = getPreferenceManager().findPreference(getString(R.string.appcenter_crashes_file_attachment_key));
Expand Down

0 comments on commit c154dd8

Please sign in to comment.