Use common implementation for getObject and importFile.

Previously the two functions have separate but similar implementation. ag/750097
fixed a bug in importFile, but we have a same bug in getObject. Instead fixing
the bug separately, the CL adds a common function that can be used from both
getObject and importFile.

BUG=23264575

Change-Id: I0bdc876ee9b11301ba4c445cc16556e9c951a8b4
diff --git a/media/mtp/mtp.h b/media/mtp/mtp.h
index d270df5..7b80d2e 100644
--- a/media/mtp/mtp.h
+++ b/media/mtp/mtp.h
@@ -37,6 +37,9 @@
 #define MTP_CONTAINER_PARAMETER_OFFSET          12
 #define MTP_CONTAINER_HEADER_SIZE               12
 
+// Maximum buffer size for a MTP packet.
+#define MTP_BUFFER_SIZE 16384
+
 // MTP Data Types
 #define MTP_TYPE_UNDEFINED      0x0000          // Undefined
 #define MTP_TYPE_INT8           0x0001          // Signed 8-bit integer