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

Commit 07a70e38 authored by Daniel Sandler's avatar Daniel Sandler Committed by Automerger Merge Worker
Browse files

Merge "Show the nearby chip for images and files too." into rvc-dev am:...

Merge "Show the nearby chip for images and files too." into rvc-dev am: bb2d9a52 am: fe25cc3b am: 4b231466

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

Change-Id: Ide0b5d96b60d1d21294a57a347953facc43fa249
parents f1d8c178 4b231466
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -1121,7 +1121,7 @@ public class ChooserActivity extends ResolverActivity implements
        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);
@@ -1285,6 +1285,12 @@ public class ChooserActivity extends ResolverActivity implements
            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();
@@ -1395,10 +1401,11 @@ public class ChooserActivity extends ResolverActivity implements
        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)) {