Skip to content
Commit 6bc896f7 authored by Oli Lan's avatar Oli Lan
Browse files

Do not throw SecurityException from getPrimaryClip.

Currently getPrimaryClip throws a SecurityException if a Uri in
clipboard has become invalid and permission to it can no longer be
granted. This is unexpected and can crash apps that are trying to
paste.

This change catches the exception and clears clipboard if this case
occurs.

Bug: 187942504
Test: atest android.appsecurity.cts.AppSecurityTests#testPermissionDiffCert
Test: build & flash, create invalid Uri by uninstalling and reinstalling Chrome
Change-Id: I9994bb03f1aed47e32a500bba8886eea3f2cd905
parent d261ad7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment