diff options
| author | 2025-01-21 15:20:37 +0000 | |
|---|---|---|
| committer | 2025-02-10 09:40:51 +0000 | |
| commit | 13bebff110f432172f046d5bec9ee0dab8db8d17 (patch) | |
| tree | 3f6847ccc5ac5befc5bfc365cfc20b3e1d1e3349 /cmds/bootanimation/BootAnimation.cpp | |
| parent | 67e5e61c2a151a1c01f379816a89e31c8374310b (diff) | |
Remove the userId before doing authority check in case of cross-profiles uri checks
This is a bug we encountered while trying to delete a document inside
the main user from the private space user using
DocumentsContract#deleteDocument. We were using ACTION_OPEN_DOCUMENT to
launch the DocsUI and the returned uris have userId prefix attached to
them; i.e. “0@com.android.providers.media.documents”.
This userId prefix result in authority mismatch exception: "java.lang.SecurityException: Requested authority 0@com.android.providers.media.documents doesn't match provider com.android.providers.media.documents”
This cl removes the userId before doing the authority check. This is
already being done in the base ContentProvider class https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:frameworks/base/core/java/android/content/ContentProvider.java;drc=1eb58995aeeb8c266f72cd37eed4044d56ea2f20;l=2757
Bug: 394024051
Flag: EXEMPT minor fix
Change-Id: Ieaeb20cadad68292e8a46fbce5b32e58c6b4d337
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
0 files changed, 0 insertions, 0 deletions