print: Prevent cross-user icon access

A specially crafted URI could cause Uri.getEncodedUserInfo to return an
incorrect value.  Instead, use the more robust getUserIdFromAuthority.

Additionally, refactored this check slightly to address a few previous
CL comments.

Bug: 376462130
Test: Manual test using steps from bug
Flag: EXEMPT BUGFIX
(cherry picked from commit 8d40513846ee77a70f17e392ef9a9fc4ac254e44)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:cf80c5596b1a5d1724f4b6e97257f96c75eab7f4
Merged-In: I020c64c8dd1b755877826c7fc7dadecae98dd5f4
Change-Id: I020c64c8dd1b755877826c7fc7dadecae98dd5f4
1 file changed