Surround ClipboardManager#getPrimaryClip in try/catch
Like getCoercedText and getHTMLText in Clipboard.java, if another app did something incorrectly when they put content into the clipboard, getPrimaryClip may crash. For example, if the another app didn't set permissions correctly this may crash. There are also some devices where hasPrimaryClip returns true but calling getPrimaryClip causes an NPE. Bug: 1059946 Change-Id: Idf5d64f86f7d85cd2723aeac3a1d4868fb579317 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097019 Commit-Queue: Gang Wu <gangwu@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#749246}
Showing
Please register or sign in to comment