Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bad8171d authored by Daniel Nishi's avatar Daniel Nishi Committed by Android (Google) Code Review
Browse files

Merge "Add EXTRA_FROM_STORAGE to photos gallery intent." into oc-dev

parents 9e89d528 9e107c56
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -275,6 +275,7 @@ public class StorageItemPreferenceController extends PreferenceController {
        intent.setAction(android.content.Intent.ACTION_VIEW);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
        intent.setType(IMAGE_MIME_TYPE);
        intent.putExtra(Intent.EXTRA_FROM_STORAGE, true);
        return intent;
    }

+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ public class StorageItemPreferenceControllerTest {
        Intent intent = argumentCaptor.getValue();
        assertThat(intent.getType()).isEqualTo("image/*");
        assertThat(intent.getAction()).isEqualTo(android.content.Intent.ACTION_VIEW);
        assertThat(intent.getBooleanExtra(Intent.EXTRA_FROM_STORAGE, false)).isTrue();
    }

    @Test