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

Commit 22f4262f authored by Roman Kiryanov's avatar Roman Kiryanov
Browse files

Set the host clipboard only for DEVICE_ID_DEFAULT device



our host does not support clipboards per virtual
device.

[C-10-7] MUST use a separate clipboard solely for
each virtual device (or disable the clipboard for
virtual devices)

Bug: 262038440
Test: presubmit
Change-Id: I5b728ec352c8e856618a40f797b49e78ab5085e8
Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
parent 9b2ce4de
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -824,7 +824,9 @@ public class ClipboardService extends SystemService {
    @GuardedBy("mLock")
    private void setPrimaryClipInternalLocked(
            @Nullable ClipData clip, int uid, int deviceId, @Nullable String sourcePackage) {
        if (deviceId == DEVICE_ID_DEFAULT) {
            mEmulatorClipboardMonitor.accept(clip);
        }

        final int userId = UserHandle.getUserId(uid);