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
This commit is contained in:
Oli Lan
2022-01-20 12:23:37 +00:00
parent 0702622783
commit 869f53b3d7

View File

@@ -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);
}
}