Merge "Label emulator clipboards with SUPPRESS_CLIPBOARD_OVERLAY" into tm-dev am: c54118d1ea

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

Change-Id: Idc6b0fcff6091fe0d2dbfa36e2f0736d3d501975
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-05-12 03:21:03 +00:00
committed by Automerger Merge Worker

View File

@@ -18,6 +18,7 @@ package com.android.server.clipboard;
import android.annotation.Nullable;
import android.content.ClipData;
import android.os.PersistableBundle;
import android.os.SystemProperties;
import android.system.ErrnoException;
import android.system.Os;
@@ -137,6 +138,9 @@ class EmulatorClipboardMonitor implements Consumer<ClipData> {
final ClipData clip = new ClipData("host clipboard",
new String[]{"text/plain"},
new ClipData.Item(str));
final PersistableBundle bundle = new PersistableBundle();
bundle.putBoolean("com.android.systemui.SUPPRESS_CLIPBOARD_OVERLAY", true);
clip.getDescription().setExtras(bundle);
if (LOG_CLIBOARD_ACCESS) {
Slog.i(TAG, "Setting the guest clipboard to '" + str + "'");