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

Commit 4b315358 authored by Matt Casey's avatar Matt Casey Committed by Automerger Merge Worker
Browse files

Merge "Change remote copy intent behavior." into tm-dev am: 4d6f7317

parents ed0976bf 4d6f7317
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -635,12 +635,13 @@ public class ClipboardOverlayController {
    }
    }


    private Intent getRemoteCopyIntent(ClipData clipData) {
    private Intent getRemoteCopyIntent(ClipData clipData) {
        String remoteCopyPackage = mContext.getString(R.string.config_remoteCopyPackage);
        if (TextUtils.isEmpty(remoteCopyPackage)) {
            return null;
        }
        Intent nearbyIntent = new Intent(REMOTE_COPY_ACTION);
        Intent nearbyIntent = new Intent(REMOTE_COPY_ACTION);

        String remoteCopyPackage = mContext.getString(R.string.config_remoteCopyPackage);
        if (!TextUtils.isEmpty(remoteCopyPackage)) {
            nearbyIntent.setComponent(ComponentName.unflattenFromString(remoteCopyPackage));
            nearbyIntent.setComponent(ComponentName.unflattenFromString(remoteCopyPackage));
        }

        nearbyIntent.setClipData(clipData);
        nearbyIntent.setClipData(clipData);
        nearbyIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
        nearbyIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
        nearbyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
        nearbyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);