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

Commit faf86628 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Sharesheet - broken file preview with profile switch"

parents 2c7c60a5 acabc574
Loading
Loading
Loading
Loading
+34 −28
Original line number Diff line number Diff line
@@ -633,6 +633,7 @@ public class ChooserActivity extends ResolverActivity {
        // due to permissions issues
        findViewById(R.id.file_copy_button).setVisibility(View.GONE);

        try {
            ContentResolver resolver = getContentResolver();
            TextView fileNameView = findViewById(R.id.content_preview_filename);
            String action = targetIntent.getAction();
@@ -654,7 +655,8 @@ public class ChooserActivity extends ResolverActivity {
                if (uris.size() == 0) {
                    contentPreviewLayout.setVisibility(View.GONE);
                    Log.i(TAG,
                        "Appears to be no uris available in EXTRA_STREAM, removing preview area");
                            "Appears to be no uris available in EXTRA_STREAM, removing preview "
                                    + "area");
                    return;
                }

@@ -668,6 +670,10 @@ public class ChooserActivity extends ResolverActivity {
                fileIconView.setVisibility(View.VISIBLE);
                fileIconView.setImageResource(R.drawable.ic_file_copy);
            }
        } catch (SecurityException e) {
            Log.w(TAG, "Error loading file preview", e);
            contentPreviewLayout.setVisibility(View.GONE);
        }
    }

    private RoundedRectImageView loadUriIntoView(int imageResourceId, Uri uri) {