From 7eee615c8d4fb5476ef24c3567c65d405ac3bf3e Mon Sep 17 00:00:00 2001 From: cyberta Date: Wed, 1 Jul 2020 18:50:31 +0200 Subject: [PATCH] fix lint warning: set URI and content type subsequently will clear the former intent URI value --- src/org/thoughtcrime/securesms/CreateProfileActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/CreateProfileActivity.java b/src/org/thoughtcrime/securesms/CreateProfileActivity.java index 77c9b3d2c..2fa1c9a36 100644 --- a/src/org/thoughtcrime/securesms/CreateProfileActivity.java +++ b/src/org/thoughtcrime/securesms/CreateProfileActivity.java @@ -336,8 +336,8 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Emoj private Intent createAvatarSelectionIntent(@Nullable File captureFile, boolean includeClear, boolean includeCamera) { List extraIntents = new LinkedList<>(); - Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI); - galleryIntent.setType("image/*"); + Intent galleryIntent = new Intent(Intent.ACTION_PICK); + galleryIntent.setDataAndType(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI, "image/*"); if (!IntentUtils.isResolvable(CreateProfileActivity.this, galleryIntent)) { galleryIntent = new Intent(Intent.ACTION_GET_CONTENT);