summaryrefslogtreecommitdiffstats
path: root/mtp/mtp_MtpDatabase.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-12-17 03:01:38 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-12-19 23:27:34 +0100
commit726a0206326ca4cf22aa7c59e174a83a0da9727f (patch)
tree5f0275dfed9c51b255e73feaeba609cd7a762da1 /mtp/mtp_MtpDatabase.cpp
parentRecovery init.rc setenforce 0 to make SELinux permissive (diff)
downloadandroid_bootable_recovery-726a0206326ca4cf22aa7c59e174a83a0da9727f.tar
android_bootable_recovery-726a0206326ca4cf22aa7c59e174a83a0da9727f.tar.gz
android_bootable_recovery-726a0206326ca4cf22aa7c59e174a83a0da9727f.tar.bz2
android_bootable_recovery-726a0206326ca4cf22aa7c59e174a83a0da9727f.tar.lz
android_bootable_recovery-726a0206326ca4cf22aa7c59e174a83a0da9727f.tar.xz
android_bootable_recovery-726a0206326ca4cf22aa7c59e174a83a0da9727f.tar.zst
android_bootable_recovery-726a0206326ca4cf22aa7c59e174a83a0da9727f.zip
Diffstat (limited to 'mtp/mtp_MtpDatabase.cpp')
-rwxr-xr-xmtp/mtp_MtpDatabase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/mtp/mtp_MtpDatabase.cpp b/mtp/mtp_MtpDatabase.cpp
index 05bb5d9fb..17053f1de 100755
--- a/mtp/mtp_MtpDatabase.cpp
+++ b/mtp/mtp_MtpDatabase.cpp
@@ -233,10 +233,17 @@ void MyMtpDatabase::endSendObject(const char* path, MtpObjectHandle handle,
}
void MyMtpDatabase::createDB(MtpStorage* storage, MtpStorageID storageID) {
+ MTPD("MyMtpDatabase::createDB called\n");
storagemap[storageID] = storage;
storage->createDB();
}
+void MyMtpDatabase::destroyDB(MtpStorageID storageID) {
+ MtpStorage* storage = storagemap[storageID];
+ storagemap.erase(storageID);
+ delete storage;
+}
+
MtpObjectHandleList* MyMtpDatabase::getObjectList(MtpStorageID storageID,
MtpObjectFormat format,
MtpObjectHandle parent) {