summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-11-04 05:14:08 +0100
committerDees Troy <dees_troy@teamw.in>2014-11-04 15:40:05 +0100
commit9eb1cd47520498e181a2d9fb2f3b464ae5327bd8 (patch)
tree578949f12a7e560d40324523d001803834e4e006 /partitionmanager.cpp
parentThis patchset causes issues with backups. (diff)
downloadandroid_bootable_recovery-9eb1cd47520498e181a2d9fb2f3b464ae5327bd8.tar
android_bootable_recovery-9eb1cd47520498e181a2d9fb2f3b464ae5327bd8.tar.gz
android_bootable_recovery-9eb1cd47520498e181a2d9fb2f3b464ae5327bd8.tar.bz2
android_bootable_recovery-9eb1cd47520498e181a2d9fb2f3b464ae5327bd8.tar.lz
android_bootable_recovery-9eb1cd47520498e181a2d9fb2f3b464ae5327bd8.tar.xz
android_bootable_recovery-9eb1cd47520498e181a2d9fb2f3b464ae5327bd8.tar.zst
android_bootable_recovery-9eb1cd47520498e181a2d9fb2f3b464ae5327bd8.zip
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 8116e858c..96266a3e8 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1516,6 +1516,8 @@ int TWPartitionManager::usb_storage_enable(void) {
char lun_file[255];
bool has_multiple_lun = false;
+ property_set("sys.storage.ums_enabled", "1");
+ sleep(1);
DataManager::GetValue(TW_HAS_DATA_MEDIA, has_data_media);
string Lun_File_str = CUSTOM_LUN_FILE;
size_t found = Lun_File_str.find("%");
@@ -1561,12 +1563,12 @@ int TWPartitionManager::usb_storage_enable(void) {
goto error_handle;
}
}
- property_set("sys.storage.ums_enabled", "1");
return true;
error_handle:
if (mtp_was_enabled)
if (!Enable_MTP())
Disable_MTP();
+ property_set("sys.storage.ums_enabled", "0");
return false;
}