Modify openDoc method of MediaDocumentsProvider to add non-read
support

Added cts tests in ag/16672211. Also tested the change manually.

Bug: 174172234
Test: atest MediaDocumentsProviderTest
Change-Id: Ia8eb83efc59bafd628dfce3f839b80ae2ec0c753
5 files changed