Fix EXIF redaction for apps with access
When opening files via ContentResolver, there are 2 code paths that
may lead to opening the file on a FUSE filesystem.
1. If EXIF redaction is required based on the file content and calling
app permissions
2. If there may be a VFS cache race if the file were to be opened on
the lower filesystem
When we decide to open a file on FUSE fs either for (1) or (2) we will
get a call into MediaProvider from FuseDaemon requesting redaction
ranges. Unfortunately, this code assumed any calls from the
MediaProvider uid was for (1).
Now, we add support for (2), by tracking the MediaProvider tid
requesting the open in MediaProvider. This info is used when
subsequently requesting redaction ranges as MediaProvider uid.
Test: atest FuseDaemonHostTest
Bug: 153764053
Change-Id: Iba275c3424dbbac68ce8add7b63a83041eadfb26
5 files changed