diff options
| author | 2022-05-24 20:20:27 +0000 | |
|---|---|---|
| committer | 2022-05-24 20:20:27 +0000 | |
| commit | fa2ab5d659e613997c4da300eb705e05b6d15513 (patch) | |
| tree | c66a15f74a5d41453d70b52d4630796d00a2f3ae | |
| parent | b7513e0bc5e6e0ad9b723dbb4bc315acc0a89386 (diff) | |
| parent | f96704530c94ef9aa8ec96f9b63d0a64aadc4588 (diff) | |
Merge "Change remote copy intent behavior." into tm-dev am: 4d6f731761 am: 4b31535805 am: f96704530c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18557688
Change-Id: I27a2dc901a1b1dd448e22fd517487eb87213f4b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java index 345f8a3c15d6..3714c15af173 100644 --- a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java +++ b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayController.java @@ -635,12 +635,13 @@ public class ClipboardOverlayController { } private Intent getRemoteCopyIntent(ClipData clipData) { + Intent nearbyIntent = new Intent(REMOTE_COPY_ACTION); + String remoteCopyPackage = mContext.getString(R.string.config_remoteCopyPackage); - if (TextUtils.isEmpty(remoteCopyPackage)) { - return null; + if (!TextUtils.isEmpty(remoteCopyPackage)) { + nearbyIntent.setComponent(ComponentName.unflattenFromString(remoteCopyPackage)); } - Intent nearbyIntent = new Intent(REMOTE_COPY_ACTION); - nearbyIntent.setComponent(ComponentName.unflattenFromString(remoteCopyPackage)); + nearbyIntent.setClipData(clipData); nearbyIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); nearbyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); |