mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-11 00:38:34 +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.reveal = ViewUtil.findById(this, R.id.reveal);
|
||||||
this.nextIntent = getIntent().getParcelableExtra(NEXT_INTENT);
|
this.nextIntent = getIntent().getParcelableExtra(NEXT_INTENT);
|
||||||
|
|
||||||
this.avatar.setOnClickListener(view -> Permissions.with(this)
|
// this.avatar.setOnClickListener(view -> Permissions.with(this)
|
||||||
.request(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
// .request(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||||
.onAnyResult(this::startAvatarSelection)
|
// .onAnyResult(this::startAvatarSelection)
|
||||||
.execute());
|
// .execute());
|
||||||
|
|
||||||
this.name.getInput().addTextChangedListener(new TextWatcher() {
|
this.name.getInput().addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -35,7 +35,7 @@ public class RecentPhotosLoader extends CursorLoader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Cursor loadInBackground() {
|
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,
|
return context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||||
PROJECTION, null, null,
|
PROJECTION, null, null,
|
||||||
MediaStore.Images.ImageColumns.DATE_MODIFIED + " DESC");
|
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) {
|
public static void selectGallery(Activity activity, int requestCode, @NonNull Recipient recipient, @NonNull String body, @NonNull TransportOption transport) {
|
||||||
Permissions.with(activity)
|
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))
|
.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(() -> selectMediaType(activity, "image/*", new String[] {"image/*", "video/*"}, requestCode))
|
||||||
.onAllGranted(() -> activity.startActivityForResult(MediaSendActivity.buildGalleryIntent(activity, recipient, body, transport), requestCode))
|
.onAllGranted(() -> activity.startActivityForResult(MediaSendActivity.buildGalleryIntent(activity, recipient, body, transport), requestCode))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user