Support transcode via MTP

If the persist.sys.fuse.transcode_mtp flag is disabled, we open files
via MediaProvider ContentResolver, this allows the MediaProvider
explictly disable transcode for the MTP process.

We are trying to optimize for the current default transcode option - B
which is to transcode by default. For this case we keep the original
path.

Note that this optimization also implies that if the user changes the
default option to A (not transcode) then no transcoding will happen even
if the user has enabled transcoding for MTP in the USB preferences.

Test: Manual
Bug: 158466651
Change-Id: I6ee8c0e74952fb4ddb94f4f2f37d108b8245dc3f
diff --git a/media/mtp/IMtpDatabase.h b/media/mtp/IMtpDatabase.h
index 81fa60c..3b9bbb0 100644
--- a/media/mtp/IMtpDatabase.h
+++ b/media/mtp/IMtpDatabase.h
@@ -39,7 +39,7 @@
     // Called to report success or failure of the SendObject file transfer.
     virtual void                    endSendObject(MtpObjectHandle handle,
                                             bool succeeded) = 0;
-    
+
     // Called to rescan a file, such as after an edit.
     virtual void                    rescanFile(const char* path,
                                             MtpObjectHandle handle,
@@ -91,6 +91,8 @@
                                             int64_t& outFileLength,
                                             MtpObjectFormat& outFormat) = 0;
 
+    virtual int                     openFilePath(const char* path, bool transcode) = 0;
+
     virtual MtpResponseCode         beginDeleteObject(MtpObjectHandle handle) = 0;
     virtual void                    endDeleteObject(MtpObjectHandle handle, bool succeeded) = 0;