Clear calling identity before retrieving app label for clipboard toast.
This fixes an issue where the source app in the clipboard access
toast was not displayed for apps targeting API 30+. This is because
the calling identity of the copying app was being used, resulting in
package visibility limitations being applied.
Bug: 182349975
Test: Manual, install app targeting API 30 and paste from another app.
Test: atest ClipboardManagerTest
Test: atest ManagedProfileCrossProfileTest#testCrossProfileCopyPaste
Change-Id: Icdd2d07a3e2855dba749dbbb3427fd3a8b217671
1 file changed