From 869f53b3d7cfee5ef6f3ba5fa1acb99dcf1d37e6 Mon Sep 17 00:00:00 2001 From: Oli Lan Date: Thu, 20 Jan 2022 12:23:37 +0000 Subject: [PATCH] Do not initiate clip classification again when copying to profile. This is a follow-on from aosp/1942953. After the changes in that CL, when copying a clip to a profile the new method setPrimaryClipInternalNoClassifyLocked must be used, so that classification is not started multiple times. Bug: 215505009 Test: build and manual check Test: atest ClipDescriptionTest Change-Id: If4b7d863b1aa70d14e28d6cbd0cb9252a606fc66 --- .../java/com/android/server/clipboard/ClipboardService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java index 3d5abfe833945..38df5f8960000 100644 --- a/services/core/java/com/android/server/clipboard/ClipboardService.java +++ b/services/core/java/com/android/server/clipboard/ClipboardService.java @@ -571,7 +571,7 @@ public class ClipboardService extends SystemService { final boolean canCopyIntoProfile = !hasRestriction( UserManager.DISALLOW_SHARE_INTO_MANAGED_PROFILE, id); if (canCopyIntoProfile) { - setPrimaryClipInternalLocked( + setPrimaryClipInternalNoClassifyLocked( getClipboardLocked(id), clip, uid, sourcePackage); } }