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

Commit 6ff4300a authored by Alison Cichowlas's avatar Alison Cichowlas Committed by Automerger Merge Worker
Browse files

Merge "Show the nearby chip for images and files too." am: bd8e5ae3

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1397108

Change-Id: I38f79f585072673d40ae8d3dab72cdd838b92c2c
parents 33afbc93 bd8e5ae3
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -934,7 +934,7 @@ public class ChooserActivity extends ResolverActivity {
        final ComponentName cn = getNearbySharingComponent();
        if (cn == null) return null;

        final Intent resolveIntent = new Intent();
        final Intent resolveIntent = new Intent(originalIntent);
        resolveIntent.setComponent(cn);
        final ResolveInfo ri = getPackageManager().resolveActivity(
                resolveIntent, PackageManager.GET_META_DATA);
@@ -1101,6 +1101,13 @@ public class ChooserActivity extends ResolverActivity {
            ViewGroup parent) {
        ViewGroup contentPreviewLayout = (ViewGroup) layoutInflater.inflate(
                R.layout.chooser_grid_preview_image, parent, false);


        final ViewGroup actionRow =
               (ViewGroup) contentPreviewLayout.findViewById(R.id.chooser_action_row);
        //TODO: addActionButton(actionRow, createCopyButton());
        addActionButton(actionRow, createNearbyButton(targetIntent));

        mPreviewCoord = new ContentPreviewCoordinator(contentPreviewLayout, true);

        String action = targetIntent.getAction();
@@ -1211,10 +1218,10 @@ public class ChooserActivity extends ResolverActivity {
        ViewGroup contentPreviewLayout = (ViewGroup) layoutInflater.inflate(
                R.layout.chooser_grid_preview_file, parent, false);

        // TODO(b/120417119): Disable file copy until after moving to sysui,
        // due to permissions issues
        //((ViewGroup) contentPreviewLayout.findViewById(R.id.chooser_action_row))
        //        .addView(createCopyButton());
        final ViewGroup actionRow =
                (ViewGroup) contentPreviewLayout.findViewById(R.id.chooser_action_row);
        //TODO(b/120417119): addActionButton(actionRow, createCopyButton());
        addActionButton(actionRow, createNearbyButton(targetIntent));

        String action = targetIntent.getAction();
        if (Intent.ACTION_SEND.equals(action)) {