mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 04:53:38 +00:00
Write external storage permission replaced with the read one.
This commit is contained in:
parent
51032d43c4
commit
4e909ff3b9
@ -213,10 +213,10 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Inje
|
||||
this.reveal = ViewUtil.findById(this, R.id.reveal);
|
||||
this.nextIntent = getIntent().getParcelableExtra(NEXT_INTENT);
|
||||
|
||||
this.avatar.setOnClickListener(view -> Permissions.with(this)
|
||||
.request(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
.onAnyResult(this::startAvatarSelection)
|
||||
.execute());
|
||||
// this.avatar.setOnClickListener(view -> Permissions.with(this)
|
||||
// .request(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
// .onAnyResult(this::startAvatarSelection)
|
||||
// .execute());
|
||||
|
||||
this.name.getInput().addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
|
@ -35,7 +35,7 @@ public class RecentPhotosLoader extends CursorLoader {
|
||||
|
||||
@Override
|
||||
public Cursor loadInBackground() {
|
||||
if (Permissions.hasAll(context, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
|
||||
if (Permissions.hasAll(context, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
return context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||
PROJECTION, null, null,
|
||||
MediaStore.Images.ImageColumns.DATE_MODIFIED + " DESC");
|
||||
|
@ -376,7 +376,7 @@ public class AttachmentManager {
|
||||
|
||||
public static void selectGallery(Activity activity, int requestCode, @NonNull Recipient recipient, @NonNull String body, @NonNull TransportOption transport) {
|
||||
Permissions.with(activity)
|
||||
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
.request(Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
.withPermanentDenialDialog(activity.getString(R.string.AttachmentManager_signal_requires_the_external_storage_permission_in_order_to_attach_photos_videos_or_audio))
|
||||
// .onAllGranted(() -> selectMediaType(activity, "image/*", new String[] {"image/*", "video/*"}, requestCode))
|
||||
.onAllGranted(() -> activity.startActivityForResult(MediaSendActivity.buildGalleryIntent(activity, recipient, body, transport), requestCode))
|
||||
|
Loading…
x
Reference in New Issue
Block a user