From 5571ca14ac478aedc991c2f7b82fa04a20375ab3 Mon Sep 17 00:00:00 2001 From: Oli Lan Date: Tue, 13 Apr 2021 17:54:51 +0100 Subject: [PATCH] Change clipboard access notification wording. In accordance with UX review feedback, this changes the wording of the clipboard access notifications to " pasted from clipboard". Bug: 179469804 Test: Build & flash, copy and paste and check wording Change-Id: Iad74f405c493561e4bda7e74a300eafe16d5e1ad --- .../com/android/server/clipboard/ClipboardService.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java index 9c10814c7591c..a4577f4d27709 100644 --- a/services/core/java/com/android/server/clipboard/ClipboardService.java +++ b/services/core/java/com/android/server/clipboard/ClipboardService.java @@ -945,14 +945,8 @@ public class ClipboardService extends SystemService { try { CharSequence callingAppLabel = mPm.getApplicationLabel( mPm.getApplicationInfoAsUser(callingPackage, 0, userId)); - String message; - if (isText(clipboard.primaryClip)) { - message = getContext().getString( - R.string.pasted_text, callingAppLabel); - } else { - message = getContext().getString( - R.string.pasted_content, callingAppLabel); - } + String message = + getContext().getString(R.string.pasted_from_clipboard, callingAppLabel); Slog.i(TAG, message); Toast.makeText( getContext(), UiThread.get().getLooper(), message, Toast.LENGTH_SHORT)