Fix RedactionInfo null pointer when reading a newly created file

An app may intentionally read or unintentionally issue reads (because
of the writeback cache) a newly created file. This will hit a null
pointer when trying to determine if redaction should occur during
reads.

Now, we assume a newly created file has nothing to redact. This is not
true because we don't know yet what the app is going to
write and an app without EXIF access can access the EXIF if they open
the newly created file before EXIF content is written. Ideally, we
should mark newly created media files with the IS_PENDING flag and
only set it to false after the file has been closed.

Test: Camera records video without crashing
Bug: 147274248
Change-Id: I1efe1212939462beb13311ffa46a122c78f180e6
1 file changed