MtpServer changes for MtpStorageManager

MoveObject and DeleteObject require
begin() and end() methods in order to
maintain database consistency. delete() now
has to return errors.

Allow sendObject after sendObjectInfo since
the spec allows this.

Test: See tests for main MtpStorageManager change
Bug: 63143623
Change-Id: Ied105e884cafd36e861521dcc59740e23b330f5f
diff --git a/media/mtp/MtpServer.h b/media/mtp/MtpServer.h
index 0204b09..af371eb 100644
--- a/media/mtp/MtpServer.h
+++ b/media/mtp/MtpServer.h
@@ -32,13 +32,13 @@
 
 namespace android {
 
-class MtpDatabase;
+class IMtpDatabase;
 class MtpStorage;
 
 class MtpServer {
 
 private:
-    MtpDatabase*        mDatabase;
+    IMtpDatabase*       mDatabase;
 
     // appear as a PTP device
     bool                mPtp;
@@ -98,7 +98,7 @@
     Vector<ObjectEdit*>  mObjectEditList;
 
 public:
-                        MtpServer(MtpDatabase* database, bool ptp,
+                        MtpServer(IMtpDatabase* database, bool ptp,
                                     const MtpString& deviceInfoManufacturer,
                                     const MtpString& deviceInfoModel,
                                     const MtpString& deviceInfoDeviceVersion,