summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2022-05-10 13:43:07 -0700
committerRoman Kiryanov <rkir@google.com>2022-05-10 13:56:17 -0700
commitf7a05bd2fa95bd61ef09e21e3d4bd5c530c9eecc (patch)
tree58dc359b12849b8e4d21e0931aaee84e1a777f16
parent3c7a3e397fcbe669a15d85c727e66330e0ae5c81 (diff)
downloadbase-f7a05bd2fa95bd61ef09e21e3d4bd5c530c9eecc.tar.gz
Label emulator clipboards with `SUPPRESS_CLIPBOARD_OVERLAY`
Emulator QA found this popup too noisy to be useful. Bug: 222604628 Test: boot the emulator, copy on the host Test: check if there is no popup in the guest Change-Id: I46323732a64202dabdd3a43bf17df7e7f3f9dd9c Signed-off-by: Roman Kiryanov <rkir@google.com>
-rw-r--r--services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java b/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java
index 28c7cad3b184..ada78a37b7ab 100644
--- a/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java
+++ b/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java
@@ -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;
@@ -136,6 +137,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 + "'");