From b97ff9544e7055ee0198d855aed6e60d5138ad14 Mon Sep 17 00:00:00 2001 From: hanyuhang Date: Fri, 24 Jul 2020 10:19:37 +0800 Subject: [PATCH] AnboxPlatformServiceProxy::updateClipboardIfNecessary: solve debug that can not return null normally If updateClipboardIfNecessary can not return null normally,Upper interface will always call updateClipboardIfNecessary until JavaBinder is all used. This will cause Android system abnormal. --- .../java/com/android/server/wm/AnboxPlatformServiceProxy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/AnboxPlatformServiceProxy.java b/services/core/java/com/android/server/wm/AnboxPlatformServiceProxy.java index 240cf0c1..94f05a87 100644 --- a/services/core/java/com/android/server/wm/AnboxPlatformServiceProxy.java +++ b/services/core/java/com/android/server/wm/AnboxPlatformServiceProxy.java @@ -208,7 +208,7 @@ public final class AnboxPlatformServiceProxy { if (clip != null && clip.getItemCount() > 0) { ClipData.Item item = clip.getItemAt(0); String itemText = item.coerceToText(context).toString(); - if (itemText == text) { + if (itemText.equals(text)) { return null; } } -- Gitee