fix read_uri_permission
This commit is contained in:
parent
183576066a
commit
9ca3fed810
5 changed files with 6 additions and 2 deletions
|
@ -111,7 +111,6 @@ public class ContributionVersionActivity extends OsmandListActivity {
|
|||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.setDataAndType(AndroidUtils.getUriForFile(getMyApplication(), pathToDownload), "application/vnd.android.package-archive");
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivityForResult(intent, ACTIVITY_TO_INSTALL);
|
||||
updateInstalledApp(false, currentSelectedBuild.date);
|
||||
}
|
||||
|
|
|
@ -589,6 +589,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
sendIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.share_fav_subject));
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, AndroidUtils.getUriForFile(getMyApplication(), dst));
|
||||
sendIntent.setType("text/plain");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(sendIntent);
|
||||
} catch (IOException e) {
|
||||
Toast.makeText(getActivity(), "Error sharing favorites: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
|
|
|
@ -843,7 +843,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
// }
|
||||
Uri fileUri = AndroidUtils.getUriForFile(getMapActivity(), getBaseFileName(lat, lon, app, ext));
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name
|
||||
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); // set the video image quality to high
|
||||
// start the video capture Intent
|
||||
mapActivity.startActivityForResult(intent, 205);
|
||||
|
@ -1881,6 +1881,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
if (r.isVideo()) {
|
||||
Intent vint = new Intent(Intent.ACTION_VIEW);
|
||||
vint.setDataAndType(AndroidUtils.getUriForFile(mapActivity, r.file), "video/*");
|
||||
vint.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
vint.setFlags(0x10000000);
|
||||
try {
|
||||
ctx.startActivity(vint);
|
||||
|
@ -1891,6 +1892,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
} else if (r.isPhoto()) {
|
||||
Intent vint = new Intent(Intent.ACTION_VIEW);
|
||||
vint.setDataAndType(AndroidUtils.getUriForFile(mapActivity, r.file), "image/*");
|
||||
vint.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
vint.setFlags(0x10000000);
|
||||
ctx.startActivity(vint);
|
||||
return;
|
||||
|
|
|
@ -1414,6 +1414,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
|
|||
final Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
|
||||
sendIntent.setType("application/gpx+xml");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(sendIntent);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2068,6 +2068,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
|||
sendIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.share_history_subject));
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, AndroidUtils.getUriForFile(getMapActivity(), dst));
|
||||
sendIntent.setType("text/plain");
|
||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(sendIntent);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue